#include<stdio.h>
#include<conio.h>
main()
{
printf("\t\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t\t\t Program to find out DIVISION\n\t\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\n");
float eng, math, ds, cf, pl, tot, per;
printf(" Enter a marks of English\t=\t");
scanf("%f",& eng);
printf(" Enter a marks of Math\t\t=\t");
scanf("%f", &math);
printf(" Enter a marks of Digital System\t=\t");
scanf("%f",& ds);
printf(" Enter a marks of Comp.Funda.\t=\t");
scanf("%f",& cf);
printf(" Enter a marks of Prog.Logic\t=\t");
scanf("%f",& pl);
tot=eng+math+ds+cf+pl;
printf("\n\n\t\tTotal marks is %f\n\n\n", tot);
if(eng>=35 && math>=35 && ds>=35 && cf>=35 && pl>=35)
{
per=tot/5;
printf("\n\n\t\tPercentage is %f\n\n\n", per);
printf("\n\n\t\tYou have passed");
if(per>=80)
printf("\n\n\n\t\tResult = First Division with Distinction\n\n\t\t");
else if(per>=60)
printf("\t\tResult = First division\n\n\t\t");
else if(per>=45)
printf("\t\tResult = Second Division\n\n\t\t");
else if(per>=35)
printf("\t\tResult = Third Division\n\n\t\t");
}
else
printf("\t\t\aResult = You have failed\n\n\t\t");
getch();
}
No comments:
Post a Comment