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 maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...