Marks>=48&&Marks<60 Second Division Marks>=36&&Marks<48 Third Division #include
#include
main()
{
int m1,m2,m3,p;
clrscr();
printf("Enter Msrks 1:");
scanf("%d",&m1);
printf("Enter Marks 2:");
scanf("%d",&m2);
printf("Enter Marks 3:");
scanf("%d",&m3);
p=(m1+m2+m3)*100/300;
{
if(p>=60)
printf("First Division");
else
if(p>=48&&p<60) printf("Second Division"); else if(p>=36&&p<48)
printf("Third Division");
else
printf("Fail");
}
getch();
}
OUTPUT
Enter Marks 1:45
Enter Marks 2:56
Enter Marks 3:79
Second Division
No comments:
Post a Comment