Program for read minimum three command line arguments, Programming Languages

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

Posted Date: 3/7/2013 12:33:22 AM | Location : United States







Related Discussions:- Program for read minimum three command line arguments, Assignment Help, Ask Question on Program for read minimum three command line arguments, Get Answer, Expert's Help, Program for read minimum three command line arguments Discussions

Write discussion on Program for read minimum three command line arguments
Your posts are moderated
Related Questions
Write a program (calculation.ccp) to allow the user to perform an arithmetic operation on the two complex numbers entered.  The user can key in one of the four operations: addition

I need an efficient and fast reverse engineer with good knowledge of assembly x86 language, strong reverse engineering skills, IDA Pro (Hex-Rays) to Linux game routine, C, C++ prog

Write a program to draw the figure shown below. the program must provide: a. Close the fish's mouth slowly (at least 5 moves from the original position to close the mouth) b.

QUESTION 1 (a) (i) What is linear programming problem? (ii) Define and explain the following terms: (1) objective function, (2) decision variable, (3) constraints, (4) feasi

* Comments in your code are required * Main Program Operation:  # Your program should first prompt the user for an integer to seed the random number Generator. "Enter an seed

Educational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms in solving programming problems Define an

Operation • This application uses an Alligator class that implements a Countable interface to display Alligator objects as shown above. • This application uses a Sheep class that i

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

Let S =  {s 1 , s 2 , .... , s k } denote a set of k genomes. The problem of fingerprinting is the task of identifying a shortest possible substring α i from each string si such t

Define Call by value - Computer Programming? Functions are raise by writing their name and an appropriate list of arguments within parenthesis. Usually these arguments are in t