Write a program which manipulates fractions

Hey,i am new in c++ programing,so I need help of you guys to solve this question

Q.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.

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
Last edited on
What have you written so far?

Remember to ensure that your code is [code]between code tags[/code] so that it has line numbers and syntax highlighting, as well as proper indentation.
Topic archived. No new replies allowed.