Exam Result Project Source Code Grade wise and Percentage wise

 #include<stdio.h>

#include<conio.h>
void main()
{
	int p,ch,b,m,c,s=0;
	float g=0;
	clrscr();
	printf("Enter Your Physics Marks:");
	scanf("%d",&p);
	printf("Enter Your Chemistry Marks:");
	scanf("%d",&ch);
	printf("Enter Your Biology Marks:");
	scanf("%d",&b);
	printf("Enter Your Mathematics Marks:");
	scanf("%d",&m);
	printf("Enter Your Computer Marks:");
	scanf("%d",&c);
	s=p+ch+b+m+c;
	printf("%d",s);
	g=s/5;
	printf("\n%f",g);
	if(g>=90)
	{
		printf("\nPass With Grade A");

		printf("\n\n\t Total Percentage=%d%",g);
	}
	else if(g>=80)
	{
		printf("\nPass With Grade B");

		printf("\n\n\t Total Percentage=%d%",g);
	}
	else if(g>=70)
	{
		printf("\nPass With Grade C");

		printf("\n\n\t Total Percentage=%d%",g);
	}
	else if(g>=60)
	{
		printf("\nPass With Grade D");

		printf("\n\n\t Total Percentage=%d%",g);
	}
	else if(g>=40)
	{
		printf("\nPass With Grade E");

		printf("\n\n\t Total Percentage=%d%",g);

	}
	else if(g<40)
	{
		printf("\nPass With Grade F");

		printf("\n\n\t Total Percentage=%d%",g);

	}
getch();
}
Previous Post Next Post