Write a C++ to perform arithmetic Operations using switch case.
1. Read two numbers ‘a’ and ‘b’
'Read your choice of operator ch.
2. If ch = ‘+’ then calculate add = a + b and display the addition result.
3. If ch= ‘- ‘then calculate sub = a – b and display the subtraction result.
4. If ch= ‘*’ then calculate mul = a * b and display the multiplication result.
5. If ch= ‘/’ then calculate div = a / b and display the division result.
6. If ch=’%’ then calculate mod = a % b and display the modulus result.
7. Otherwise display invalid operator
1
Expert's answer
2016-10-06T03:36:37-0400
Dear Jamal, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment