Homework 1, Count your Arguments.

Short Description:

Write a program that uses command line arguments.

Goals

When you finish this homework, you should have:

Formal Description

Write a program that will count from 1 to 10 by 1. The default output should be
1, 2, 3, 4, 5, 6 , 7, 8, 9, 10
There should be only a newline after the last number. Each number except the last should be followed by a comma and a space.

To make your program more functional, you should parse command line arguments and change behavior based on their values.

Argument Parameter Action
-f, --first yes, an integer Change place you start counting
-l, --last yes, an integer Change place you end counting
-s, --skip optional, an integer, 1 if not specifiedChange the amount you add to the counter each iteration
-h, ? none Print a help message including these instructions.
-j, --joke none Tell a number based joke.

So, if your program is called counter

counter -f 10 --last 4 --skip 2
should produce
10, 8, 6, 4

Please use the last supplied argument. If your code is called counter,

counter -f 4 -f 5 -f 6 
should count from 6.

You should count from first to last inclusively.

You you may not display the last number if the skip value is something other than 1.

The skip value should always be greater than 0.

Notes

Required Files

A single c/c++ source code file that solves the problem. If you do multiple versions, submit a zip or tar file containing all of your source code.

Submission

Submit the assignment to the D2L folder Homework 1 by the due date.