Grade Determination in C
Grade determination finds if the total average of your grade is Pass or Failed..
#include <stdio.h>OUTPUT
int main()
{
int prelim, midterm, prefinal, final;
int TotalAve;
printf("Enter your Prelim Grade: ");
scanf("%d", &prelim);
printf("Enter your Midterm Grade: ");
scanf("%d", &midterm);
printf("Enter your Prefinal Grade: ");
scanf("%d", &prefinal);
printf("Enter your Final Grade: ");
scanf("%d", &final);
TotalAve = ((prelim+midterm+prefinal+final)/4);
printf("\nYour Final Grade: %d", TotalAve);
if (TotalAve <= 74)
{
printf("\nYou are FAILED!\n");
}
if (TotalAve >= 75)
{
printf("\nYou are PASSED!\n");
}
system("pause");
return 0;
}
Grade Determination in C
Reviewed by code-dev
on
12:41 AM
Rating:
No comments: