Marks>=48&&Marks<60 Second Division Marks>=36&&Marks<48 Third Division Marks<36 Fail Your Total , Your Percentage ? #include
#include
main()
{
int m1,m2,m3,t;
float p;
clrscr();
printf("Enter Marks 1:");
scanf("%d",&m1);
printf("Enter Marks 2:");
scanf("%d",&m2);
printf("Enter Marks 3:");
scanf("%d",&m3);
t=m1+m2+m3;
p=t*100/300;
printf("\nYour total=%d",t);
printf("\nyour per=%f\n",p);
if(p>=60)
printf("First Division");
if(p>=48&&p<60) printf("Second Division"); if(p>=36&&p<48)
printf("Third Division");
if(p<36)
printf("Fail");
getch();
}
OUTPUT
Enter Marks 1:45
Enter Marks 2:56
Enter Marks 3:78
Your total=179
Your per=59.0000
Second Division
No comments:
Post a Comment