Create an input file of all valid and invalid expressions and answer to user prompts.

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

PLEASE READ ALL INSTRUCTIONS.  CANNOT USE PRINTF OR SCANF FOR INPUT / OUTPUT.  MUST USE PUTCHAR() GETCHAR().
I HAVE ATTACHED MY ATTEMPT AT THIS CODE, BUT IT MIGHT NOT BE MUCH HELP.
Write a program to perform a simple arithmetic calculation. 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 one character at a time, perform the indicated
calculation and display the result or print out an appropriate error message. For example: 15 + 30 = 45
• Operators should include + – * / %
• Operands are positive integers, no sign
• Use getchar() function to read the expression
• Use putchar() function to output the expression
• Expression will have variable spacing before the first operand, between operator and operands and
after the second operand (zero, one or more spaces).
• Your program needs to be in a loop asking whether the user wants to enter another expression with a
Y/N type of an answer (one character).
• Code a function for each operator to do the appropriate operation (5 functions).
• No global variables, arrays, string and/or character handling functions may be used in this lab.
• Your program needs to generate an appropriate error message if the expression is invalid.
• You may ONLY use getchar() and putchar() functions for reading and writing the expression. You may
use scanf() and printf() functions for user prompts, error messages, etc.
Input
One expression at a time with user prompts to repeat.
Output
The whole expression entered by the user EXACTLY as typed in (including spaces), the result or an appropriate
error message. Need to show all test cases and scenarios for valid and invalid expressions (there are many)
and how your program handled it.
Run
Create an input file of all valid and invalid expressions and answer to user prompts. Run the program on the
command line using input/output redirection:
➢ Lab3b.exe < lab3b_input.txt > lab3b_output.txt
Turn In
Turn in source code, input file and output file.

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services