Rational implementation in C++ to perform rational arithmetics
Linux
to compile:
$ make
to run:
$ ./main
default contructor:
Rational <int> a; // a = 0/1
contructor with denominator and numerator:
Rational <int> x(1, 2);
den()
num()
+
-
/
*
>
<
>=
<=
==
!=
<<
>>