its ment to have the user input a fraction and return simplified or mixed fraction.
#include
using namespace std;
void mixedFraction (int w, int n, int d);
void main ()
{
int w = -1, n = -1,d = -1;
mixedFraction ( w, n, d );
cout << w << n << '/' << d << endl;
mixedFraction (w, n, d );
cout << w << n << '/' << d << endl;
mixedFraction (w, n, d );
cout << w << n << '/' << d << endl;
mixedFraction (w, n, d );
cout << w << n << '/' << d << endl;
return;
}
void mixedFraction (int w, int n, int d)
{
cout << "Enter numerator";
cin >> n;
cout << "Enter denominator";
cin >> d;
cout << "Enter whole number";
cin >> w;
int wholeNumber = 0;
cin >> w;
cout << "Enter numerrator (>= 0)";
cin >> n;
cout << "Enter denominator";
cin >> d;
}
2007-03-23
13:43:19
·
2 answers
·
asked by
Peter G
1
in
Computers & Internet
➔ Programming & Design