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

Programming logic???, write c++ source code to find the number of digits i...

write c++ source code to find the number of digits in a given integer? pls ans

Project 1, CSCI 3380 Project 1 For Mano’s Computer design, we have the fol...

CSCI 3380 Project 1 For Mano’s Computer design, we have the following flowchart for fetch and decode phases: Please write the code to simulate the computer to

Write a program to display some data in bar graph form, Write a program to ...

Write a program to display some data in bar graph form. Have at least 20 elements, which can be positive or negative; draw each element with a vertical bar, going up if the data is

Write the vhdl code for traffic light controller, The schematic of the traf...

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Basics question, I am building wpf application and i want to install this a...

I am building wpf application and i want to install this application on a server pc and share it to other pces on a net work , my question is i have static class that contain data

Silver light uses wpf to provide included web handles, Silver light uses WP...

Silver light uses WPF to provide included web handles Microsoft Technologies Silverlight uses WPF to provide included web handles similar to Adobe Display, but with more focus on a

Example of undetermined coefficients, Example :  Solve the following differ...

Example :  Solve the following differential equation. y (3)   -  12 y''+48 y' + 64 y = 12 - 32 e -8t + 2 e 4t Solution :    We first require the complementary solution

insertion sort algortihm, Define a higher order version of the insertion s...

Define a higher order version of the insertion sort algortihm. That is define functions insertBy :: Ord b => (a->b) -> a -> [a] -> [a] inssortBy :: Ord b => (a->b) -> [a] ->

Define functions with no arguments and no return values, Define Functions w...

Define Functions with no arguments and no return values? When a function has no arguments it doesn't receive any data from the calling function. Likewise, it doesn't return any

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