0

C++ program please help me

Write and run a program that simulates a simple calculator. It reads two integers and a character. If the character is a ‘+’, the sum is printed; if it is a ‘-‘, the difference is printed; if it is a ‘*’, the product is printed; if it is a ‘/’, the quotient is printed; and if it is a ‘%’, the remainder is printed. Sample Input: 12 % 7 Sample Output: 5 Sample Input: 19 x 10 Sample Output: 190 Sample Input: 12 $ 7 Sample Output: Invalid operator Entered Sample Input: 10 / 3 Sample Output: 3.33333

7th May 2018, 6:21 PM
Bilal
1 Answer
7th May 2018, 6:48 PM
Sona Mohan
Sona Mohan - avatar