Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi, this is my first C program and I really don't know how to do the first part which is too check if all arguments
Hi, this is my first C program and I really don't know how to do the first part which is too check if all arguments should be accepted.
Can you help me with that? Thanks!
I'm coding in C and using Linux
Total Points: 20 Ex. 1 - A Simple Interger Calculator (9 Points) In this exercise, you will create a C program to implement a simple integer calculator Your calculator should accept three arguments as input, x, op, y, where x and y are integers and op is one of the operators +, -, *, / to perform the corresponding arithmetic operations. 1. Use vi to create a C program source file simplecalc.c 2.(1 Point) The program should include a comment section at the beginning that describes its purpose (couple of lines), the author your name), your department, a small "history section indicating what changes you did on what date. Program to implement a simple calculator Author Dept. Date Notes * ** * * ******************************************** Joseph D Joseph D Comp. Science. Feb 10 2020 Comp. Science. Feb 11 2020 Initial version. Added error handling. The code should be properly indented for readability as well as contain any additional comments required to understand the program logic. 3. (1 Point) The source code should be compilable by (exactly) using the command gee -o simplecalc simplecalc.c 4.(3 Points) Your program should accept the three arguments mentioned above as its input. If the user does not pass this argument, you should display an error message and terminate with error code 1. $ ./simplecalc Error: usage is simplecalc Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started