26 lines
336 B
C
26 lines
336 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main() {
|
|
float g; /* Grade */
|
|
|
|
/* Prompt the user */
|
|
printf("Enter the grade in percentage: ");
|
|
scanf("%f", &g);
|
|
|
|
/* Check if grade is > 60% */
|
|
if (g >= 60)
|
|
printf("Congratulations, your grade is passing.\n");
|
|
else {
|
|
printf("Sorry, try again.");
|
|
|
|
exit(1);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|