Write a program which manipulates fractions

Assignment Help Programming Languages
Reference no: EM13765203

Write a program which manipulates fractions.

It should get two fractions from the user by inputing two numerators and two denumerators (integers) from 0 to 999 and then have the user select an operation from addition, subtraction, multiplication, and division, check for input errors (<0 or >999) and for division by 0 and gives appropriate error messages, terminating in case of error.

It then displays the two fractions in fraction form, the operation between them and the result of the operation in fraction form and the result of the division.

Take care of the fraction line!

Example:

2 3 17

- + - = -- = 1.42

3 4 12

The program should then give the option to the user to repeat the process and enter a new pair of fractions or terminate the program

Reference no: EM13765203

Questions Cloud

Survivability and cyberwarfare as it effects the world : Define Global Computer Connectivity, Survivability and Cyberwarfare as it effects the world, provide little history, how does it effect cyberterrorism, advantages and disadvantages of those connected and those not connected, is it going away soon
Business ethics and moral relativism issues : What does the court suggest that Metro-North should have done in this case that would have satisfied the duty?
Importance of human recourse management : Analyses the importance of Human Recourse Management ( HRM) in improving employees performance
Assume that the current yield to maturity on the bond : Compute the price of a $5,000 par value bond with a coupon rate of 7.5% (semi-annual payments) and 19 years remaining to maturity. Assume that the current yield to maturity on the bond is 8.60%.Round all dollar answers to 2 decimal places
Write a program which manipulates fractions : Write a program which manipulates fractions. It should get two fractions from the user by inputing two numerators and two denumerators (integers) from 0 to 999 and then have the user select an operation from addition, subtraction, multiplication, ..
An umbrella liability policy : An umbrella liability policy:
Discuss the chain of command and how problems can arise : Write a 500-600 word, 2 page paper, identify and discuss the chain of command and how problems can arise within the organizational structure
Concern about the financial viability of the current insurer : Duration of the need, Concern about the financial viability of the current insurer, Capacity of the policyholder to fund premiums, Cost of the premium compared to alternatives
Calculate the weighted-average contribution margin : Calculate the weighted-average contribution margin. Determine Delectable's monthly breakeven point in dozens of plain donuts and custard-filled donuts. Prove your answer by preparing a summary contribution.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to find smallest-largest value from n numbers

Write down program which will determine the smallest, largest and average values in collection of N numbers. Get value of N before scanning each value in collection of N numbers.

  Program to run at end of semester to produce grade summary

Write the program for instructor to run at the end of the semester to produce grade summary for one student, as shown in box below.

  Input number by user and display positive and negative

Input a number entered by the user and display "positive" if it is greater than zero, "negative" if it is less than zero, and "zero" if it is equal to zero.

  Rewrite the extract.pl using bioperl

Rewrite the "extract.pl" using BioPerl, including the use of Bio::SeqIO to read the genome FASTA file ("mystery_seq1.fas") and the use of Bio::Seq for obtaining coding sequences and translating sequences.

  Design considerations to comply with ada

Browsing devices that assist people with disabilities, such as an aural browser, are especially dependent on the best use of CSS styles. What design considerations should you be aware to comply with ADA?

  Write class which uses string array or arraylist

Write the class which uses string array or arraylist object to holld five students, array to hold five charters student letter grade) and five arrays of doubles each to hold each students set.

  Generate a salary as a number with two digits

Generate a salary as a number with two digits after the decimal point. The salary for a teacher should be in the range from $40,000 to 70,000.

  Write a program to solve to find loan on tv

Write a program to solve follwoing problem: A TV set is bought with loan of $563 to be paid off with 5 monthly payments of $116. Interest rate is 1 percent per month.

  Design program to compute-display number of miles per hour

Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing.

  Do we require to format our program output does formatting

do we need to format our program output? does formatting only apply to numeric values? what about percent values and

  Executes the program to find the representation

Executes the program to find the representation a 19,2014 md 50000 for all of the p values that the function allows. Show the results in a table.

  Program for saving account balance report

Savings account balance report from customer savings account file. Every input savings account record contains account number, balance forward, deposits (sum of all deposits).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd