/******************************************************************************************** example 1 -- driver.cpp test program for class roman ********************************************************************************************/ #include "roman.h" #include <iostream> using namespace std; void main() { int input; cout << "This program will test the ability of the roman class to" << endl << "work like an integer." << endl << "Printable (valid) roman numerals run from 1 to 3888." << endl << "\"underflow\" is printed for integers less than 1" << endl << "\"overrun\" is printed for integers greater than 3888" << endl; cout << "Enter an integer: "; int sum = 0; while (cin >> input) { roman N(input); cout << input << " looks like \""; N.show(); cout << "\" as a roman numeral." << endl; sum += input; roman sigma(sum); cout << "the running sum of all your entries is: " << sum << " ("; sigma.show(); cout << ")" << endl; cout << "\nEnter an integer: "; } }