Nov 27 2012, 12:40 PM
Hey guys I was learning c language then I dont know what's gone wrong here is my program
So now the problem is when I enter marks like 98,99,88,87,79. These are above 80% still it shows fail:mad: WHY??:confused:
Code:
#include<stdio.h>
int main()
{
int m1,m2,m3,m4,m5,per;
printf("Enter the marks of five subjects\n");
scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5);
per=(m1+m2+m3+m4+m5)/500*100;
if(per>=80)
printf("First Division\n");
else if(per>=60)
printf("Second Division\n");
else if(per>=50)
printf("Third Division\n");
else
printf("Fail");
return 0;
}