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, 21.06.2019 18:10
For each of the following claims, determine whether they are true or false. justify your determination (show your work). if the claim is false, state the correct asymptotic relationship as o, θ, or ω. unless otherwise specified, lg is log2.(a) (b) (c) (d) (e) (f) (g) (h) (i) (j)n+1 =22n =2n =1 =ln2 n =n2 +2n−4 =33n = 2n+1 =√n = 10100 =o(n4) o(2n)θ(2n+7 ) o(1/n)θ(lg2 n) ω(n2 )θ(9n ) θ(2n lg n )o(lg n) θ(1)
Answers: 1
question
Computers and Technology, 21.06.2019 21:40
Write c function that can replace all the positive elements to 0 and negative to 1 in undefined length one-dimensional array. test your program in the main program by defining one-dimensional array of 6 elements
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
According to alisa miller foreign news bureaus
Answers: 3
question
Computers and Technology, 22.06.2019 12:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
You know the right answer?
Write a program that lets the user perform arithmetic
operations on fractions. fractions are...
Questions
question
Mathematics, 21.03.2020 00:02
Questions on the website: 13722367