### School Management in C

This example explain how to use logical operators in if statement. logical operators are used to perform logical operations of given expressions (relational expressions) or variables.

#### Source Code

```/*
School Result Management
1.Five Marks input through the keyboard
2.Find total and average of the given marks.
3.Find the result whether the given marks must be >=35
4.Grade as per the following condition.

*/

#include<stdio.h>

int main()
{
int m1,m2,m3,m4,m5,total;
float avg;
printf("\nEnter 5 Marks : \n");
scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5);
total=m1+m2+m3+m4+m5;
avg=total/5.0;
printf("\nTotal   : %d",total);
printf("\nAverage : %f",avg);
if(m1>=35&&m2>=35&&m3>=35&&m4>=35&&m5>=35)
{
printf("\nResult  : Pass");
if(avg>=90&&avg<=100)
{
}
else if(avg>=80&&avg<=90)
{
}
else if(avg>=70&&avg<=79)
{
}
else
{
}
}
else
{
printf("\nResult  : Fail");
}
return 0;
}```

### Output

```Enter 5 Marks :
88
97
89
56
92

Total   : 422
Average : 84.400002
Result  : Pass