









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Grade>=
Enter Grade
Print Pass
True
False
Grade is chosen to be a float data type because it is a real number
pass and fail are integers -> they are counters
pass and fail have to be initiated to 0 so that the counter can count up from 0
If the grade is greater or equal to 50, then increment the pass counter by 1. Note “%f” in scanf.
If the grade is less than 50, then increase the fail counter by 1
Note : A left brace, { , begins the body of each if statement and a corresponding right brace, } , ends each if statement’s body. Any number of statements can be placed in the body of an if statement.
Repeat for all grades and display the output
Note: %f can be used also in printf to display numbers with decimal places