Feed Headline Animator

Write a program to calculate the division obtained by the student(Using Else-if Statement).

Main()
{
int mks;
float per;
char g;
printf(“Enter your marks\n”);
scanf(“%d”,&mks);
per=mks*100/850;
if((per>=80)&&(per<=100))
g=’A’
else if ((per>=60)&&(per<=80))
g=’B’
else if ((per>=40)&&(per<=60))
g=’C’
else if ((per >= 30)&&(per< = 40))
g=’D’
else
printf (marks = %d\n”,mks);
printf (“marks = %f \n”,per);
printf(“marks =%c\n”,g);
getch();
}


Posted by: Wasim Javed

No comments:

Post a Comment