Advertisement
Guest User

main.cpp

a guest
Aug 8th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "Roman_int.h"
  4.  
  5. using namespace std;
  6.  
  7. //------------------------------------------------------------------------------
  8.  
  9. int main()
  10. try
  11. {
  12.     Roman_int r;
  13.  
  14.     do {
  15.         cout << "Enter a roman number: ";
  16.         cin >> r;
  17.  
  18.         if (r.as_int() != NO_VALUE)
  19.             cout << r.as_int() << "\n\n";
  20.     } while (true);
  21.  
  22.     return 0;
  23. }
  24. catch (exception& e) {
  25.     cerr << e.what() << '\n';
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement