I've got already the formula but it is hard for me when talking of fraction:
Addition : a/b + c/d = (a*d +b*c)/(b*d)
Subtraction : a/b – c/d = (a*d – b*c)/b*d)
Multiplication : a/b * c/d = (a*c)/(b*d)
Division : a/b /c/d = (a *d) /( b*c)
Here is the flow:
The user should type the first fraction, an operator and a second fraction. The program should then display the result and ask if the user wants to continue. There should be checking the number from the user exceeds the normal range and move to type long; otherwise to double.