#include #include using namespace std; void menu(int& selection); int addFractions(int& a, int& b, int& c, int& d, int& cdenom, int& result); int subtractFractions(int& a, int& b, int& c, int& d, int& cdenom, int& result); int multiplyFractions(int& a, int& b, int& c, int& d, int& cdenom, int& result); int divideFractions(int& a, int& b, int& c, int& d, int& cdenom, int& result); int quit(); int main() { menu(); return 0; } void menu() { int a = 0, int b = 0, int c = 0, int d = 0, int cdenom = 0, int result = 0, int selection = 0; cout << "The purpose of this program is to allow you to perform simple mathematical\n" << "operations on fractions.\n\n"; cout << "Select from one of the following options: \n" << "1) Addition\n" << "2) Subtraction\n" << "3) Division\n" << "4) Multiplication\n" << "5) Quit Program\n"; cout << "Enter your selection and fractions now: "; cin >> selection >> a >> b >> c >> d; if (selection == 1) addFractions(a, b, c, d, cdenom, result); else if (selection == 2) subtractFractions(a, b, c, d, cdenom, result); else if (selection == 3) multiplyFractions(a, b, c, d, cdenom, result); else if (selection == 4) divideFractions(a, b, c, d, cdenom, result); else if (selection == 5) quit(); else cout << "Invalid input!\n"; } int addFractions() { cout << "Add\n"; return 0; } int subtractFractions() { cout << "Subtract\n"; return 0; } int multiplyFractions() { cout << "Multiply\n"; return 0; } int divideFractions() { cout << "Divide\n"; return 0; } int quit() { cout << "Program Terminating\n"; return 0; }