Question: USING GETCHAR AND PUTCHAR Only write a C program to perform simple C arithmetic calculations. The user is to enter a simple expression (integer operator

USING GETCHAR AND PUTCHAR Only write a C program to perform simple C arithmetic calculations. The user is to enter a simple expression (integer operator integer) such as 15 + 30 The program is to extract the 2 operands and the operator, perform the indicated calculation and display the result. For example 15 + 30 = 45 (must include the spaces between the numbers and the mathematical operators.) Operators should include + , - , * , / , and % Operands are positive integers , no sign Use getchar to input the expression Allow for variable spacing before the first operands and between operators and operands ( 0, 1, or more spaces) Allow the user the option of entering another expression Code a function for each operator to do the appropriate arithmetic operations (5 functions) No global variables No string handling functions No arrays May only use input and output functions such as getchar and putchar Input: interactive. Allow the user to enter multiple expressions Output: Echo the input ( both user prompts and the user entered data ) Print the whole expression , with the result or an appropriate error message. Be sure output data shows all valid and invalid test data and how your program handled it. (Please don't copy past other Chegg users answers as I checked all of them and they don't match with the conditions mentioned above, please read the conditions carefully and only reply back with the proper code that uses all the conditions mentioned above, Thank you)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!