#include #include "Rational.h" using namespace std; int main() { Rational first = Rational(2,3) + Rational(5,7) * Rational(3,5); Rational second = (Rational(7,2) - Rational(5,6)) / Rational(5,7); cout << "first=" << first << endl; cout << "second=" << second << endl; cout << "++first=" << ++first << endl; cout << "--second=" << --second << endl; int r = first.compareTo(second); if (r < 0) cout << first << "<" << second << endl; if (r == 0) cout << first << "=" << second << endl; if (r > 0) cout << first << ">" << second << endl; return 0; }