Skip to the task
Layout
Back to classic view

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

CHECKTask 15 of 22 · step 7: Drills: check yourselfAlways "Excellent". What do you fix?
Always "Excellent". What do you fix? in practice/03/

The program always prints "Excellent", even when the grade is 4.

Details & hint
main.c:5:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
    5 |     if (grade = 10) {

Stuck? grade = 10 stores 10 instead of comparing. It should be grade == 10.

practice 03 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p03_grades main.c)
target_link_libraries(p03_grades PRIVATE course_input)