Thursday, January 2, 2014

Programming C in using Conditional

Program :

#include

#include

main() {
int m1,m2,m3,m4,m5,per;
printf("Enter your marks of five subject :\n "); scanf("%d %d %d %d %d", &m1,&m2,&m3,&m4,&m5); per=(m1+m2+m3+m4+m5)/5; if(per>=60) printf("You get 1st Division "); else
{if(per>=50)
printf("You are get 2nd Division"); else {if(per>=40) printf("You are get 3rd division"); else
printf("\n\t\tYou are Fall"); } } getch(); }








No comments:

Post a Comment

Please post your Comment..