Suppose in an exam the passmark is 30 and you got 30 marks or above 30 then you will pass else you fail.
Syntax if statement:
#include <stdio.h>
int main () {
/* local variable definition */
int passmark = 30;
int yourmark= 27;
/* change the yourmark value to see see different result */
if( passmark <=yourmark) {
/* if condition is true then print the following */
printf("You passed the exam !\n" );
}
else{
printf("You are fail in the exam !\n" );
}
return 0;
}