12345678910111213141516171819 |
- #include <iostream>
- #include "Rational.h"
- using namespace std;
- int main() {
- Rational r(19,20);
- cout << r << endl;
- Rational r2(3, 727);
- r += r2;
- cout << r << endl;
- float x = 1.375;
- cout << x << endl;
- cout << Rational(x) << endl;
- double x2 = 1.375;
- cout << x2 << endl;
- cout << Rational(x2);
- }
|