Skip to the task
Layout
Back to classic view

You are looking at lesson 3. Your place is still lesson 4, task 1: Style.

CHECKTask 15 of 22 · step 7: Drills: check yourself

Always "Excellent". What do you fix?

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

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.