/* FILE: rn.cpp * driver for object-oriented roman number calculator, P8 */ #include #include #include "RomanNum.h" using namespace std; //main() ------------------------------------------------------------ // int main(){ RomanNum r1, r2, result; char op; //prompt and read cout << "Enter RomanNumeral Expression (ctrl-d to Exit) : "; cin >> r1 >> op >> r2; while(cin){ //evaluate expression result = apply(r1, op, r2); //display results cout << endl << r1 << " (" << r1.toDec() << ") " << op << ' ' << r2 << " (" << r2.toDec() << ") = " << result << " (" << result.toDec() << ") " << endl << endl; //prompt and read cout << "Enter RomanNumeral Expression (ctrl-d to Exit) : "; cin >> r1 >> op >> r2; } cout << endl << "Exiting..." << endl; }