Course Solutions Uncategorized (Solved) : Make Program Reduce Final Results Show Simplest Fractions Maincpp Include Include Fraction Q30538737 . . . .

(Solved) : Make Program Reduce Final Results Show Simplest Fractions Maincpp Include Include Fraction Q30538737 . . . .

 

Can you make the program to reduce the final results and showthe simplest fractions?

main.cpp:

#include <iostream>

#include “fraction.h”

using namespace std;

int main()

{

fraction f1(9, 8);

fraction f2(2, 3);

fraction result;

cout << “The result starts off at “;

result.print();

cout << endl;

cout << “The product of “;

f1.print();

cout << ” and “;

f2.print();

cout << ” is “;

result = f1.multipliedBy(f2);

result.print();

cout << endl;

cout << “The quotient of “;

f1.print();

cout << ” and “;

f2.print();

cout << ” is “;

result = f1.dividedBy(f2);

result.print();

cout << endl;

cout << “The sum of “;

f1.print();

cout << ” and “;

f2.print();

cout << ” is “;

result = f1.addedTo(f2);

result.print();

cout << endl;

cout << “The difference of “;

f1.print();

cout << ” and “;

f2.print();

cout << ” is “;

result = f1.subtract(f2);

result.print();

cout <<

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post