Question: So Im supposed to use I/o redirection while using getchar and putchar and with this particular assignment Im completely lost on combining the two. My

 So Im supposed to use I/o redirection while using getchar and
So Im supposed to use I/o redirection while using getchar and putchar and with this particular assignment Im completely lost on combining the two. My professor told me I cant use FILE * and thats how I learned redirection so Im now completely lost.

Lat for p MEn COMPUTER SCIENCE DEPARTMENT PIERCE COLLEGE CS 539 Lab 3B Obiective: To gain experience in the use of repetion, character processing and robust input in a modular program. Problem definition: C program to perform simple C arithmetic calculations. The user is to enter a simple expression Write a integer operator integer) such as 1530 The progam is to extract the 2 operands and the operator, perform the indicated calculation the result. For example 15+30-45 Operators should include+,-, . /, ard %, Operands are positive integers, no sign Use getchar to input the expression. 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 only use input and output fuctions such as gelichar and putchar Input Interactive. Allow the user to enter mulople expressions. Be sure to adequately test the program. Outpat Echo the input (both user prompts and uses cntered 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 progam handled it. Tum In: Input data, program lising, and output file along wih the disk containing your executable file Adequatcly error check ALL, user input

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!