Wednesday, 6 June 2018

How to write program to calculate and print grade of students on output screen in c

/* program to print grade */
# include <stdio.h>
void main ()
{
int a,b,c,d,e,per ;
clrscr () ;
per = (a+b+c+d+e)/500*100 ;
if (per>=60)                                    /* condition for first division */
printf ("\n First division:") ;
else if (per>=50)                             /* for second division */
printf ("\n Second division:") ;
else if (per>=40)                             ?* for third division */
printf ("\n Third division:") ;
else
printf ("\n fail:") ;
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...