Write a C program to perform simple C arithmetic calculations. More info on picture that is attached.

follow all instructions on the attatched image. Make sure it is using I/o redirection. Also, add a good amount of comments

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

COMPUTER SCIENCE DEPARTMENT
PIERCE COLLEGE
CS 539 Lab 3B
Objective: To gain experience in the use of repetition, character processing and robust input in a modular program.
Problem definition:
Write a C program to perform simple Carithmetic 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
Operators should include +, 2 * , , and %.
Operands are positive integers, no sign.
Use getchar to input the expression. use I lo Redirection
Allow for variable spacing before the first operand and between operators and operands. (Zero, one, or
more spaces.)
Allow the user the option of entering another expression.
Code a function for each operator to do the appropriate arithmetic operation (5 functions).
No global variables. No string handling functions.
No arrays.
YOU MAY NOT USE ANY STRING HANDLING FUNCTIONS IN THIS PROGRAM.
You may only use input and output functions such as getchar and putchar.
Input
Interactive. Allow the user to enter multiple expressions.
Be sure to adequately test the
program.
Output
Echo the input (both user prompts and user entered data).
Print the whole expression with the result or an appropriate error message.
Be sure your output data shows all valid and invalid test data and how your program handled it.
Turn In:
Input data, program listing, and output file along with the disk containing your executable file.
Adequately error check ALL user input.

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER