#include #include "roman.h" #include "inttoeng.h" main() { char inbuf[MAX_ROMAN_LEN]; char outbuf[MAX_ENGLISH_LEN]; int i; for(;;) { getRomanNumeral(cin, inbuf); i = romanToInt(inbuf); if(cin.eof()) break; if(i < 0) cout << "Invalid sequence of characters " << inbuf << endl; else if(intToEnglish(i, outbuf)) cout << outbuf << endl; else cout << "Integer " << i << " out of range" << endl; } }