subject

Write a program that lets the user perform arithmetic operations on fractions. fractions are of the form a/b, where 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 denominator of each fraction. furthermore, your program must run until the user quits and must consist of at least the following functions:

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:50
Using the artofstat website, run a permutation test to see if there is a difference in the mean amount of time spent on emails per day between in state and out of state students. (make sure to generate 10,000 permutations.) in state students: 2 3 3 6 2 1 1 5 3 2.5 out of state students: 1 2 2 1 2 1 4 3 9 1 10 1 3 what is the p-value?
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
You know the right answer?
Write a program that lets the user perform arithmetic operations on fractions. fractions are of the...
Questions
question
Mathematics, 15.11.2020 23:40
question
Mathematics, 15.11.2020 23:40
question
Business, 15.11.2020 23:40
question
Mathematics, 15.11.2020 23:40
question
Chemistry, 15.11.2020 23:40
Questions on the website: 13722363