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

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!