guess the obtained marks out of total and assign a grade to it
Mon Oct 16 2023 19:47:52 GMT+0000 (Coordinated Universal Time)
Saved by
@usman_hamed
#include<stdio.h>
int main()
{
int bio,chem,phy,marks,obt;
printf("enter bio marks");
scanf("%d",&bio);
printf("enter chem marks");
scanf("%d",&chem);
printf("enter phy marks");
scanf("%d",&phy);
obt=phy+chem+bio;
printf("your total out of 255 is %d",obt);
if (obt<=255 && obt>200)
{
printf("your grade is A");
}
else if (obt<=200 && obt >150)
{
printf("ypur grade is B");
}
else if (obt<=150 && obt> 100)
{
printf("your grade is C");
}
else if (obt < 100)
{
printf("u are fail ");
}
else
{
printf("invalid number");
}
}
content_copyCOPY
Comments