#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,avg;
clrscr();
printf("Enter the marks of the 3 subjects\n");
scanf("%d%d%d",&a,&b,&c);
avg=(a+b+c)*100/300;
if (avg>=60 && avg<=100 )
{
printf("First Division);
}
else if (avg>50 && avg<60)
printf("Second Division");
else if (avg>33 &&avg<50)
printf("Third division");
else
printf("You fail");
getch();
}
#include<conio.h>
void main()
{
int a,b,c,avg;
clrscr();
printf("Enter the marks of the 3 subjects\n");
scanf("%d%d%d",&a,&b,&c);
avg=(a+b+c)*100/300;
if (avg>=60 && avg<=100 )
{
printf("First Division);
}
else if (avg>50 && avg<60)
printf("Second Division");
else if (avg>33 &&avg<50)
printf("Third division");
else
printf("You fail");
getch();
}
No comments:
Post a Comment