#include <stdio.h>
int main(void)
{
float standing = 53;
float score, grade;
printf(“\nA program that determines whether a student passes (or fails) a subject given his/her last exam score.”);
printf(“\n”);
printf(“\nNote:”);
printf(“\n\tThe last exam has a total of 150 points.”);
printf(“\n\tThe student got a class standing of 53% prior to the last exam.”);
printf(“\n”);
printf(“\nEnter score for the last exam:”);
scanf(“%f”, &score);
if ((score < 0) || (score > 150))
{
printf(“\nINVALID SCORE!!”);
}
else
{
grade = (standing * 0.8) + (((score / 150)*100)*0.2);;
if (grade >= 60)
{
printf(“\nGrade = %f”, grade);
printf(“\n”);
printf(“\nPASS!!”);
}
else
{
printf(“\nGrade = %f”, grade);
printf(“\n”);
printf(“\nFAIL!!”);
}
}
return 0;
}