You are on page 1of 1

I Love Mathematics

Overview Mathematics is a very imperative thing in our lives. Without it, you wont be able to count how many coins you have in your pocket, calculate a grading system, or even know your age. Thus, Mathematics has become part of our world every hour, minute or second. For this problem, you must write a program that could perform basic arithmetic operations like addition, subtraction, multiplication and division. Input The first input X (X<=10) will determine the number of test cases to be processed and should not exceed to 10; otherwise it will terminate the program. Before the input Y (Y<=2012), a string Enter number Z: , must be preceded where Z is the line number. Output Print out the sum, difference, product and quotient of the numbers given (must start the mathematical operation with number 1) that will contain two decimal places. The output should be preceded by the string The sum is: , (separate line), The difference is: , etc. Sample Input 3 Enter number 1: 2.9 Enter number 2: 58 Enter number 3: 1052.78

Sample Output The sum is: 1061.48 The difference is: -1107.88 The product is: 177077.60 The quotient is: 4.75

You might also like