{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Source.cpp - *JANINE DABU ASSIGNMENT 1 Write a program that...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/*JANINE DABU - ASSIGNMENT 1 Write a program that reads two fractions such as 1/2 and 1/4 and computes and stores the sum, the difference, the product and the result of dividing one by the other in four other fractions, respectively. Display the four resulting fractions.*/ #include <iostream> using namespace std; int main() { int n1, d1, n2, d2; /*n=numerator, d=denominator*/ /*1=numerator, 2=denominator (sum=sum, diff=difference, pro=product, quo=quotient)*/ int sum1, sum2, diff1, diff2, pro1, pro2, quo1, quo2; char slash = 0; /*slash=seperates the numerator and denominator of the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}