(Latest Revision: 04/09/2000)
FOURTH CS 1500 SOLO PROGRAM: Writing a Simple
Loop
OBJECTIVE: The purpose of this programming assignment is
to get you started writing and using loops in your
programs.
THE ASSIGNMENT:Your assignment is to write a program
that inputs a number from the user and then writes a little
message that many times.
INPUT: The program must prompt for and read the number of
repetitions desired by the user.
OUTPUT: After the user enters the number of repetitions
the program must do some error-checking. If the user did not
enter a number between 1 and 100, inclusive, then the program
must output an error message and stop. If the number of
repetitions is within the legal range, then the program must
write a one-line message that many times. You may choose your
own message for this program.
EXAMPLE OUTPUT: Examine the
sample script
to get an idea of how it should look when you run the program.
WHAT TO TURN IN: Before midnight on the due date,
e-mail the following two items to me:
- A copy of the source code, properly documented.
- A filtered script showing ten appropriate test runs
with different kinds of input.
My e-mail address is:
john@ishi.csustan.edu
Please use the following subject lines exactly
for the e-mails:
For the source file: CS1500_Solo4_Source
and for the script file: CS1500_Solo4_Script.
Note that there are no spaces in these subject lines. If you
like, you can copy and paste the subject lines right from this
document.
Thanks! Your use of these subject lines will
really be a big help to me when I try to sort through the
perhaps hundred e-mail messages that will be in my electronic
mailbox!
WHEN IS THIS ASSIGNMENT DUE?
Look for the due date in
the class schedule.
(It's at the top level of the class directory.)