saparmuratx / Rational

Rational implementation in C++ to perform rational arithmetics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rational

Rational implementation in C++ to perform rational arithmetics

Platforms:

Linux

Run & Compile:

to compile:
    $ make
to run:
    $ ./main

Contructors:

default contructor:
Rational <int> a; // a = 0/1

contructor with denominator and numerator:
Rational <int> x(1, 2);

Getters:

den()
num()

Operators:

+
-
/
*

Comparison:

>
<
>=
<=
==
!=

IO Operator:

<<
>>

About

Rational implementation in C++ to perform rational arithmetics


Languages

Language:C++ 89.0%Language:Makefile 11.0%