Question: Write a program that allows the user to pass the parameters to be executed and compute the results of some mathematical operations. The program must
Write a program that allows the user to pass the parameters to be executed and compute the results of some mathematical operations. The program must be able to add, subtract, and multiply. When there are no parameters, the parameters contain the wrong numbers or a parameter is invalid, the program should print the message: "Wrong parameters". The first parameter must be one of the three previous strings, while the second and third parameters must be integer numbers. To find out which of the commands has been passed, you may use the strcmp function.
C using stdio.h
#include int main(int argc, char *argv[])
Example
input : sub 2 5
output: sub 2 5: -3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
