Copyright © 2024 by
Rance D. Necaise
|
|
3.2 If StatementsC like Python provides the float avg; avg = (grade1 + grade2 + grade3) / 3.0; if(avg >= 90) printf("Excellent Work!\n"); printf("Your average is %0.2f\n", avg); If the condition is true, that is, the average is greater than 90, then the message Your grade is an A. will be printed. If the condition is false, the if(condition) statement
|