Question: write in C program You are to use Visual Studio to write a simple desktop calculator. The program will: Read a floating point number, Read
write in C program
You are to use Visual Studio to write a simple desktop calculator. The program will:
- Read a floating point number,
- Read an operator (+, -, *, /, %)
- Read a second floating point number
- Check for error conditions such as a missing or unknown operator, division by zero, modulus by zero or trying to do modulus on non-integral values
- Print either an error message or the result of the calculation and then terminate
- If the result of the calculation is an integer, it should be printed with no places after the decimal.
The user might leave zero or one spaces between the numbers and the operator. Your program will need to read the input carefully to handle these situations.
Your program should produce output similar to this (input shown in bold):
3+ 7 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
