#include
void main ()
{
int mark1 ,mark2 ;
float total1,total2,sum;
printf ("Enter the total mark of the assignment \n");
scanf ("%d", &mark1);
printf ("Enter the total exam of the assignment \n");
scanf ("%d", &mark2);
total1=(mark1*40)/100;
if (total1 <16)
printf ("You have to RETAKE the paper \n");
else
printf ("You have pass the paper \n");
total2=(mark2*60)/100;
if (total1 <24)
printf ("You have to RESIT the paper \n");
else
printf ("You have pass the exam \n");
sum=total1=total2;
if (sum >= 70)
printf ("Grade A %f \n",sum);
else if (sum >= 60 && sum <=69)
printf ("Grade B %f \n",sum);
else
printf ("Grade C %f \n",sum);
}
No comments:
Post a Comment