No description
Find a file
2022-07-16 17:36:36 +02:00
fractions.cpp Switch to long long 2020-04-19 22:21:13 +02:00
fractions.hpp Indentation 2022-07-16 12:58:57 +02:00
LICENSE Initial commit 2022-07-16 15:33:56 +00:00
README.md Merge fractions 2022-07-16 17:36:36 +02:00

mmathlib

Compile and run

git clone https://code.smolnet.org/micke/mmathlib.git
cd mmathlib
g++ -o fractions fractions.cpp
./fractions

Output

7/3=(7/3)
7/3=2.333333333
1/11=(1/11)
1/11=0.09090909091
(7/3)+(1/11)=(80/33)
(7/3)+(1/11)=2.424242424
(7/3)-(1/11)=(74/33)
(7/3)-(1/11)=2.242424242
(7/3)*(1/11)=(7/33)
(7/3)*(1/11)=0.2121212121
(7/3)/(1/11)=(77/3)
(7/3)/(1/11)=25.66666667
0.75=(3/4)