Hi,
We're using Stephen Kochan's Book, Programming in ANSI C.
We're up to the Arrays section (Chapter 7) and I am having trouble
creating this program.
"Write a program which asks your user to enter any number of numeric test grades between 0 and 100.
Verify that each number entered is in the correct range. The user can enter the number 999 to terminate
data entry. Data entry might look like this:
Enter grade #1: 78
Enter grade #2: 94
Enter grade #3: 672
Sorry, that's an incorrect value. Please try again.
Enter grade #3: 67
Enter grade #4: 82
Enter grade #5: 999
Thank you.
Once the data has been read, print a bar chart that shows how many grades were between 95 to 100, 90 to
94, 85 to 89, 80 to 84, 75 to 79, 70 to 74, 65 to 69, 60 to 64, and 0 to 59. The output may look like this:
95-100: X
90-94: XXX
85-89: XXXXX
80-84: XXXXXXX
75-79: XXX
70-74: XXXXXXXX
65-69: X
60-64: XX
0-59: X
Make sure your report lines up correctly on the first column of x's as shown above."
Thank you for your help.
I just can't seem to understand how to store the input properly.
Once the input is stored I am thinking that I would be using many "IF/ELSE" statements to print the output.
I just can understand how to store the input in the array.
I appreciate anything you have to say.