subject

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 60. 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 consist of at least the
following functions:

a. function menu: this function informs the user about the programs
purpose, explains how to enter data, and allows the user to select the
operation.

b. function 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.
(notice that this function has a total of six parameters.)

c. function 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. (notice that this function has a total of six parameters.)

d. function multiplyfractions: this function takes as input four
integers representing the numerators and denominators of two fractions,
multiplies the fractions, and returns the numerators and denominators of
the result. (notice that this function has a total of six parameters.)

e. function 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.
(notice that this function has a total of six parameters.)

some sample outputs are:

3 / 4 + 2 / 5 = 23 / 20
2 / 3 * 3 / 5 = 6 / 15

your answer need not be in the lowest terms.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
When is it appropriate to use an absolute reference
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 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
You know the right answer?
Write a program that lets the user perform arithmetic
operations on fractions. fractions are...
Questions
question
Mathematics, 15.07.2020 01:01
question
Mathematics, 15.07.2020 01:01
question
Mathematics, 15.07.2020 01:01
Questions on the website: 13722363