-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
28 lines (21 loc) · 701 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <string>
#include "Decomp.h"
using namespace std;
int main(void)
{
string nom, denom;
cout << "Welcome to Some Egyptian fractions program. \n"
<< "I will ask you to give me the nominator and denominator of a fraction. \n"
<< "Then I will return to you Egyptian fraction of it. \n"
<< "If you put 0 in the denominator the program will end. \n\n\n";
do
{
cout << "Nominator: " ;
getline(cin, nom);
cout << "Denominator: ";
getline(cin, denom);
cout << "Actual return value is: " << Decomp::decompose(nom, denom) << endl << endl;
} while (denom != "0");
return 0;
}