Computers and Technology, 27.04.2021 16:00 shippo
Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b are integers and b is not equal to 0. Your program must be menu driven, allowing the user to select the operation ( , -, *, or /) and input the numerator and the denominator of each fraction. Furthermore, your program must consist of at least the following function
menu: This function informs the user about the program's purpose, explains how to enter data, how to quit and allows the user to select the operation.
addFractions: This function takes as input four integers representing the numerators and denominators of two fractions, adds the fractions, and returns the numerator and denominator of the result.
subtractFractions: This function takes as input four integers representing the numerators and denominators of two fractions, subtracts the fractions, and returns the numerator and denominator of the result.
multiplyFractions: This function takes as input four integers representing the numerators and denominators of two fractions, multiplies the fractions, and returns the numerator and denominator of the result.
divideFractions: This function takes as input four integers representing the numerators and denominators of two fractions, divides the fractions, and returns the numerator and denominator of the result.
Here are some sample outputs of the program:
3 / 4 +2 / 5 = 23 / 20
2 / 3 * 3 / 5 = 2 / 5
Answers: 3
Computers and Technology, 24.06.2019 21:50
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
Answers: 1
Computers and Technology, 25.06.2019 05:40
How to make a negative number positive in excel
Answers: 3
Computers and Technology, 25.06.2019 16:30
If your job involves creating a positive image for a company in the media, what would your job description be?
Answers: 1
Computers and Technology, 26.06.2019 03:30
What do you ensure when you set up goals and objectives for your website design?
Answers: 1
Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the...
Chemistry, 18.11.2019 14:31
Mathematics, 18.11.2019 14:31
Health, 18.11.2019 14:31
Mathematics, 18.11.2019 14:31
Biology, 18.11.2019 14:31
Mathematics, 18.11.2019 14:31
Social Studies, 18.11.2019 14:31
History, 18.11.2019 14:31
Mathematics, 18.11.2019 14:31