Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Conditions.

RUNTask 8 of 22 · step 4: A loop over the gradesRun it with three grades
Run it with three grades in practice/01/

Type 3, then 9, 11, 4, 10.

Checklist

  • Every task is one commit with a clear message.
Details & hint
$ .\build\debug\practice\03\p03_grades.exe
How many grades? 3
1. Grade: 9
Very good
2. Grade: 11
Grade must be between 1 and 10.
Grade: 4
Unsatisfactory
3. Grade: 10
Excellent
Average: 7.67

You should see: 11 doesn't fit, so the program asks again, and the average is worked out from 9, 4 and 10.

practice 01 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p01_hello main.c)
opened for this task
$ .\build\debug\practice\03\p03_grades.exe
How many grades? 3
1. Grade: 9
Very good
2. Grade: 11
Grade must be between 1 and 10.
Grade: 4
Unsatisfactory
3. Grade: 10
Excellent
Average: 7.67