| |
| META TOPICPARENT |
name="CSC121SylS2023" |
Repetition, files, and Colors
Learning Objective(s) |
| | Overview of the Program
The program is to allow the user to guess colors in a file. The file contains numbers representing colors with 4 per row. The program is to allow the user to guess each color and output the number correct.
Details |
|
< < |
- Your colors are to be read, blue, green, and yellow.
|
> > |
- Your colors are to be red, blue, green, and yellow.
|
| |
- You must use constants for the colors and the number of colors per line in the file.
- Reject any invalid numbers (out of range)
- Use a for loop to the colors in one row
|