command line arguments

Apr 16, 2013 at 4:32pm
Your program must not use a menu system. Instead the behaviour of the program will
be controlled using command line arguments. Your system will respond to the
following command line arguments.
• -l LENGTH (required) How long the generated sequence will be. The length
is a natural number.
• -r (optional) The sequence will be randomly generated (with range 0-100)
using the current time as a seed value. If this argument is not present then
the sequence will be a normal counting sequence e.g. 1, 2, 3, 4....
• -t TRANSFORMATION-TYPE (required) Which transformation will be applied.
Possible values for TRANSFORMATION-TYPE are the following:
• “sq” Square each element in the sequence.
• “dbl” Multiply each element in the sequence by 2
Apr 16, 2013 at 4:37pm
What have you written so far? What are you stuck on?
Apr 16, 2013 at 4:41pm
i havent started, its my first time coding
Apr 16, 2013 at 4:45pm
You should at least get started first. And that prompt looks very difficult for this to be your first time coding, are you sure you have never been required to write code before?
Apr 16, 2013 at 4:55pm
well its all blank
Topic archived. No new replies allowed.