Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions