Please read the requirement very carefully. The program I want is not that complicated it should be easy but I'm making a mistake somewhere and I'm not getting the result I want the program is;
A program that reads in the numerators and denominators of two fractions. The program should print the product of the two fractions as fraction and as a percent.
my code is
//I hope I'm using the right code tags here.
using namespace std;
int Fn ,Fd, Sn, Sd;
cout<<"enter the numerator and the denomenator for the first fraction"<<endl;
cout<<"Enter the numerator and the denomentaor"<<endl;
cout<<"for the second fraction"<<endl;
if (Fd==0 || Sd==0)
cout<<"You cant not divide by zero, try again"<<endl;
FracAns = Fn*Sn / Fd*Sd ;
PercAns = FracAns / 100;
cout<< "the procuct of the two fraction as a fraction is: "<<endl;
cout<< " as percentage is "<<PercAns<<endl;
my program does not getting the result I want either for math. problem or for programming one please I just want to know what is wrong I'm doing. I'm just doing that for fun and as a chanllenge for me and for everybody in this beautiful forum. Thanks.