// Roman Numeral Test Driver // CIS 261 // Developed In-Class 1/26/05 + 1/31/05 #pragma hdrstop #include #include #include "romanclass.h" //--------------------------------------------------------------------------- int main() { char usertext[80]; int X; romannum A; romannum B; romannum C; A.ch2rom("MCMXVLCVMMM"); cout << "Value of A: " << A.rom2int() << endl; cout << "Enter Roman Num B:"; B.get(cin); cin.ignore(80, '\n'); cout << "Value of B: " << B.rom2int() << endl; if (A.GT(B)) cout << "A is bigger" << endl; else cout << "B is equal or bigger" << endl; C.int2rom(0); C.SETEQ(B); C.sub(A); cout << "B - A = " << C.rom2int() << " or " ; C.put(cout); cout << endl; do { cout << "Enter Roman Num B:"; B.get(cin); cin.ignore(80, '\n'); cout << "Value of B: " << B.rom2int() << endl; } while ( B.rom2int() > 0 ); cout << "Enter any character to quit "; cin >> usertext; return 0; } USEUNIT("romanclass.cpp"); //---------------------------------------------------------------------------