1234567891011121314151617181920212223242526272829 |
- #include <iostream>
- #include "Rational.h"
- ////
- using namespace std;
-
- int main() {
- Rational a(1,2);
- Rational b(8,4);
- Rational c;
-
- c = a + b;
- c = a * b;
-
- // funcionara????
- cout << a + 0.5 << endl;
-
- cout << 0.5 + a << endl;
-
- cout << 0.5 + a + 1.3 << endl;
-
- (a + b + c).display();
-
- c.display();
-
- cout << boolalpha << (a > b) << endl;
-
-
- return 0;
- }
|