I have no idea where to begin. 1. Write a collection of fuinctions to do arithmetic with rational numbers(common fractions). Define functions getRational, displayRational, addRational, and subtractRational whose prototypes are:

void getRational (int& numer, int& denom);
void displayRational (int numer, int denom);
void addRational (int& ansNum, int& ansDenom, int num1, int denom1, int num2, int denom2);
void subtractRational (int& ansNum, int& ansDenom, int num1, int denom1, int num2, int denom2);

Design main as a driver function that inputs pairs of rationals and displays for each pair the sum and difference. To produce results that are in reduced form, write and call a greatest common divisor (gcd) function and divide the numerator and denominator of each fraction by their gcd.

Is this supposed to be in a particular language? or pseudocode? And you need to show work, or ask a more specific question about what you don't understand, to receive help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.