Skip to main content
Logo image

Section 19.8 The Fraction Calculator

We’ll use a Google Doc to share all of the pieces of code that different groups are writing. Please follow the link given below.
We’ll furthermore be working on the Thayer School servers for this problem, although you are welcome to use the code window provided below for some code development and testing.
Here are the prototypes for the fraction calculator:
void getFraction(int *num, int *denom);
void getOp(char *operation);
void simplify(int *num, int *denom);
void addFractions(int n1, int d1, int n2, int d2, int *num, int *denom);
void multiplyFractions(int n1, int d1, int n2, int d2, int *num, int *denom);
int computeResult(int n1, int d1, char op, int n2, int d2, int *num, int *denom);
void printEverything(int n1, int d1, char op, int n2, int d2, int num, int denom);

admin.....open in new window

Please sign in with your group in the Google Doc below. Once your group is finished, please paste it into the correct location of the Google Doc for the whole class to see.

If you cannot see this document, please click here.