Reference no: EM1366624
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 (+, -, *, /) and input the numerator and denominator of each fraction. Your program must consist of at least the following functions:
a. Function menu: This function informs the user about the program's purpose, explains how to enter data, and allows the user to select the operation.
b. Function addFractions: This function adds two fractions together (or you can overload the +operator()).
c. Function subtractFractions: This function subtracts one fraction from another (or you can overload the -operator()).
d. Function multiplyFractions: This function multiplies two fractions together (or you can overload the *operator()).
e. Function divideFractions: This function divides one fraction into another (or you can overload the /operator()).
Some sample outputs are:
3 / 4 + 2 / 5 = 23 / 20
2 / 3 * 3 / 5 = 6 / 15
Your answers need not be in the lowest terms.
Calculate the amount of the equal periodic payments
: Following are the present value factors for $1 discounted as 8 percent for 1 to 5 periods. Each of the following items is based on 8 percent interest compounded yearly from day of deposit to day of withdrawal.
|
Federal patient protection
: How might the new federal Patient Protection and Affordable Care Act of 2010 affect the revenue of the health care industry?
|
How software architecture department can support production
: Explain how Software Architecture Department can support production, inventory, sales, and marketing to assure Zilack can meet its business objectives.
|
Compute the required annual investment
: A businesswoman wishes to invest a certain sum of money at the end of every year for five years. The investment will receive 6 percent compounded yearly.
|
Write program for user to perform arithmetic operations
: 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.
|
Standard deviation of return
: The expected returns earned from investment in the stock of two companies, Company A and Company B, are shown in the following table. Use the table to complete parts (a) through (e) below.
|
Determine the effective interest rate on the bonds
: Shaid company issued $2,000,000 of 6 percent, ten year convertible bonds on June 1st, 1993 at 98 plus accrued interest. The bonds were dated April 1st, 1993, with interest payable April 1st and October 1se. Bond discount is amortized semiannually on ..
|
Create an algorithm to produce list of customers
: Create an algorithm to produce list of customers from Glad Rags Clothing Company's customer master file. Each record on customer master file contains the customer's number
|
Disease-oriented health care system
: Describe the role of health care reform in shifting the focus from a disease-oriented health care system toward one of wellness and prevention, and how does nursing fit to this shift?
|