Write a program to show a menu of paragraph on screen
as below:
1. Do addition. 2. Do subtraction. 3. Do multiplication. 4. Do division. 5. quit Enter your selection ( 1 to 5 ): Ask user enter any two integers and store them into memory boxes. According user's choice, write a switch statement to display the result. For example, If users input 4 and 5 two numbers and select operation 1, you print the following statement: 4 + 5 = 9 If users input 4 and 5 two numbers and select operation 3, you print the following statement: 4 * 5 = 20 If users input 4 and 2 two numbers and select operation 4, you print the following statement: 4 / 2 = 2 If users input 4 and 0 two numbers and select operation 4, you print the following statement: You can not divide them since divisor is zero. 4. User is able to continue to make a selection except quitting. |