605: Mainline
Evidently, you need to have your program do the following:
- Iterate over all command-line arguments that may contain flags.
- For each such argument, determine whether the first character
indicates the presence of flags.
- For each flag-containing argument, iterate over all flag characters.
- For each flag character, set a variable value to indicate that
the flag has been seen.
To accomplish this work, you can use a for
statement to iterate over
the appropriate command-line arguments, an if
statement to test for
flag-marking hyphens, another for
statement to iterate over flag
characters, and a switch
statement to look for specific flags and
to take appropriate variable-assignment actions.