Marco
2013-03-11 20:31:52 UTC
Write a program that inputs two fractions (a numerator and a denominator for each). The program should work properly for all fractions, except those that have a zero in either denominator. If the user enters 0 in a denominator, give an error message and exit the program. You will then use these two fractions to do the following:
Add the two fractions together and give the resulting fraction and the decimal equivalent. Remember that you can only add fractions that have the same denominator and for this lab you may just multiple the two denominator together (make sure you appropriately multiply the numerators), to give a common denominator, without worrying about the least common denominator. If the two fractions that were entered were 9/13 and 7/12 the output would be shown as both 199/156 and 1.2756.
Multiply the two fractions together and give the resulting fraction and the decimal equivalent. If the two fractions that were entered were 2/9 and 6/3 the output would be 12/27 and 0.4444