Program for read minimum three command line arguments, Programming Languages

Assignment Help:

1. Write a program that reads a minimum of three command line arguments and displays the program's results.

a. Command Line arguments:

 i. The first argument will be the program name.

 ii. The second argument will be the function to be executed

 iii. The third through ending arguments will be the appropriate data.

b. Program will implement the following functions:

 i. Command max finds the largest of list of integer numbers in the command line

 ii. Command min finds the smallest of list of integer numbers in the command line

 iii. Command sum calculates the sum of integer numbers in the command line

 iv. Command average calculates the average of integer numbers in the command line. Return type should be an int, not floating point. (Your function should protect against a divide by zero error and display appropriate error messages.

 v. Treat these functions as options. They should be preceeded by a - or --

c. Include comments for each function prototype, similar to the form:

/** Function name:

*

* Desription:

* Input:

* Output:

*/

d. You may use the atoi function.

e. No Global variables.

f. Example usage: (there must be whitespace after the program executable name and before the option - and between numbers. Numbers may be signed. ) problem8 -max 18 99 -3 014 -9 +1


Related Discussions:- Program for read minimum three command line arguments

Shell script, find value of nCr using function

find value of nCr using function

Rewrite the xhtml code, Below is an example of an invalid XHTML page. Your ...

Below is an example of an invalid XHTML page. Your goal is to rewrite the code so that: No deprecated/obsolete tags are being used All elements are nested correctly (i.e

Write a shell script to find the maximum of three numbers, W.A.S.S to find ...

W.A.S.S to find the maximum of three numbers Program # W.A.S.S to find the maximum of three numbers echo "Enter three No.:" read no1 read no2 read no3 if test $no1 -gt $n

Develop an application for spacerocks game, Extend the SpaceRocks game and ...

Extend the SpaceRocks game and provide a warp feature which allows the ship to jump to a random location to escape a rock. The warp feature is only activated once the shields have

Write a program that draws the initials j, Write a program that draws the i...

Write a program that draws the initials J G P on the form similar to that shown in Fig J 1 (using straight lines and curve semicircles). The figure can not have corners. All ends a

Program that takes names of 5 students in 2d character array, Write a progr...

Write a program that takes names of 5 students in 2D Character Array and their GPAs in 1D array. Arrange the names in alphabetical order and display on screen along with GPA.

A traveler wants to purchase a number of traveler''s checks, A traveler wan...

A traveler wants to purchase a number of traveler''s checks, each having a set amount for four different currencies: Mexican pesos, Euro dollars, Swiss francs, and US dollars. A t

Explain cascading style sheets, Question: (a) In JavaScript, the Windo...

Question: (a) In JavaScript, the Window Object is commonly used to request information from a user or to output some results. Give three ways how to create instances of the

Matlab homework, Matlab Assignment # For each of the three datasets (data1....

Matlab Assignment # For each of the three datasets (data1.txt, data2.txt, and data3.txt in bnhw2q2.zip), cluster the data using k-means in Matlab, with k=2, 3, 4 and 5 using the pr

Linux Lab Assignments, I have a linux lab class that consist of 1 lab assig...

I have a linux lab class that consist of 1 lab assignment per week for 5 weeks. It is an online virtual lab and is fairly easy, I just don''t have the time.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd