// this program must run with your RationalT class unchanged. // this provides the standard for the interface. // If this program does not compile with your RationalT class, change your class. #include #include "RationalT.h" using namespace std; int main() { RationalT a; RationalT aa{3}; RationalT b{1,4}; RationalT c{1,8}; cout << "a = " << a << endl; cout << b << " + " << c << " = " << b+c << endl; cout << b << " - " << c << " = " << b-c << endl; cout << b << " * " << c << " = " << b*c << endl; cout << b << " / " << c << " = " << b/c << endl; cout << c << " = " << c.Numerator() << "/" << c.Denominator() << endl; cout << c << " = " << static_cast(c) << endl; if (b == c) { cout << "b and c are the same." << endl; } return 0; }