Division of given marks


Levels of difficulty: / perform operation:

C program to compute the division from the given marks of 5 subjects.

Program

  
#include <stdio.h>
#include <conio.h>
void main()
{
	int m1,m2,m3,m4,m5,per;
	clrscr();
	printf("\nENTER THE MARKS OF THE SUBJECTS:\n");
	scanf("%d %d %d %d %d",&m1,&m2,&m3,&m4,&m5);
	per=(m1+m2+m3+m4+m5)/5;
	if(per>=60)
		printf("\nFIRST DIVISION");
	else
	{
		if(per>=50)
			printf("\nSECOND DIVISION");
		else
{
			if(per>=40)
				printf("\nTHIRD DIVISION");
			else
				printf("\nFAIL");
		}
	}
	getch();
}


Output