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 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
5.a fishing rod is formed from a composite material of 0.5 kg of glass fibers embedded in a matrix of 0.5 kg of epoxy resin. the glass fibers are assumed to be long, continuous and unidirectional. to achieve a greater stiffness it is proposed to use a different composite that is comprised of long continuous carbon fibers that will be embedded in a matrix of 0.5 kg of epoxy resin. if the modulus of elasticity of the carbon fiber composite is 10% greater than the elastic modulus of the glass fiber composite, estimate the mass of carbon fibers that will be used to make the carbon fiber composite. assume the applied tensile stress is parallel to the direction of the long axis of the fibers. the epoxy resin, glass fiber, and carbon fiber have an elastic modulus of 5, 86, and 350 gpa respectively and a density of 1100, 2500, and 1800 respectively.
Answers: 3
question
Computers and Technology, 25.06.2019 03:30
Kou converged his word document to a powerpoint document. when he received the powerpoint, he was missing material. which most likely explains why the material was missing? a it did not have a proper heading b he incorrectly copied and pasted it c he did not save his document properly d there was not enough space in powerpoint
Answers: 1
You know the right answer?
Write a program that lets the user perform arithmetic
operations on fractions. fractions are...
Questions
question
Mathematics, 18.10.2020 01:01
question
History, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
question
Mathematics, 18.10.2020 01:01
Questions on the website: 13722362