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 to display words of a file in ascending order, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Area under curve, Area Under Curve Write a program to find the area und...

Area Under Curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve be

C program with creation of child process using fork system, Problem 6. ...

Problem 6. Demonstrate how and when can you use the commands- vi, cat, chmod, grep, man, pwd, ps, kill, mkdir, rm demonstrating how and when the above 10 commands can be

C++ programing, how to rewrite C++ program the DNAStrand class (DNA Project...

how to rewrite C++ program the DNAStrand class (DNA Project) to instead store the nucleotide sequence in a dynamically-allocated array?

Hb programming test, The purpose of the HB Programming test is to assess wh...

The purpose of the HB Programming test is to assess whether a candidate has sufficient knowledge to join our team here and beyond that where they would fit within our teams. The

CGI mailer Script, i neeed an CGI Script that send mass emails i need this...

i neeed an CGI Script that send mass emails i need this input fields Sender Name: Sender Email: Subject: Message: choose (HTML Or text ) , by default HTML Emails and send bu

Network management configuratio, You will create a simple network managemen...

You will create a simple network management configuration which checks that certain programs are running on your network and are performing as expected, and that certain system det

Lisp and Prolog, Is there one can help me in the language Lisp and Prolog

Is there one can help me in the language Lisp and Prolog

Shell script to remove colons from a colon–separated record, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

What is the switch statement, What is the switch Statement? This is a dif...

What is the switch Statement? This is a different form of the multi way decision that It is well structured, but can only be used in certain cases where: 1. Here, Only one var

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