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, 22.06.2019 00:10
How does access indicates that a filter has been applied to a specific column
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
You know the right answer?
Write a program that lets the user perform arithmetic operations on fractions. fractions are of the...
Questions
question
Biology, 30.06.2019 05:40
Questions on the website: 13722361