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

Program to find Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...