lab 7 template eas230

lab 7 template eas230 - #include #include...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <string> #include <math.h> using namespace std; int printMenu(); int hexSymbolValue(char c); int readBinValue( bool vect[] ); int readHexValue( char vect[] ); int binaryToDecimal( bool vect[], int size ); int hexidecimalToDecimal( char vect[], int size ); const int maxInputLength = 255; int main() { while (true) { int choice = printMenu(); // display menu, return user choice switch (choice) { case 0 : return 0; case 1 : { bool myArray[maxInputLength]; int myArraySize; myArraySize = readBinValue(. ....... ); int value = . .......... ; cout << "result = " << value << endl; break; } // end case 1 Binary to Decimal
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
case 2 : { char myArray[maxInputLength]; int myArraySize; myArraySize = readHexValue(. ........... ); int value = . ................... ; cout << "result = " << value << endl; break; } // end case2 Hex to Decimal } // end switch } // end while (true) } // end main int printMenu() { while (true) { cout << "---------------------------------------------" << endl; cout << "Please choose a command" << endl; cout <<
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 12/05/2011.

Page1 / 6

lab 7 template eas230 - #include #include...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online