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
Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

Write a function called withdraw (in the file 'withdraw.m') that simulates withdrawing money from a bank account. The function takes a single input argument, a positive scaler doub

Problem 1. What are the potential advantages of treating two related classes as subclasses of some superclass? 2. Explain the various tools for software implementation 3.

1. Write a shell script to locate executable files. This script takes a list of file names from the command line and determines which would be executed had these names been given a

You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our BU04 lab). In this assignment,

1. Write a bash shell script which searches through your folders for files with the extension *.tex, and then interactively deletes the corresponding *.aux, *.dvi and *.log files (

Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.

An HTML document may be created via any HTML editor or text editor such as notepad etc.

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

Write 3 somewhat simple scripts / programs in any language, combination of languages, and/or software. Please tell me the task you are trying to accomplish in the scripts. Idea