Create a simple command line program to calculate the


Question: Create a simple command line program to calculate the average of a variable quantity of integers that are passed as an argument when the program is called. This uses the argv array from main - you should not use "scanf" or "cin" functions to complete this project.

When the program is launched, have it display a welcome message.

Also make sure to have the program display a help message if the user forgets to give any integers as the argument.

The below examples show the program on a Windows system.

If you use a Mac or Linux your program very likely will not have the ".exe" extension which is fine.

Example of calling the program with arguments:

average.exe 1 2 3 4 5 6

The result of the above should be something similar to:

Welcome to the Average Program. It is very average really.

The average is: 3.5

Example of calling the program without arguments:

            average.exe

The result might be:

            Welcome to the Average Program. It is very average really.

     Usage: average X (X is 1 or more integers)

I'm not sure how to solve the program. Can anyone help me? Provide the code.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Create a simple command line program to calculate the
Reference No:- TGS0947101

Expected delivery within 24 Hours