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.
    90-100 - A Grade
    80-89  - B Grade
    70-79  - C Grade
    <70    - D Grade
    Fail   - No Grade
int main()
    int m1,m2,m3,m4,m5,total;
    float avg;
    printf("\nEnter 5 Marks : \n");
    printf("\nTotal   : %d",total);
    printf("\nAverage : %f",avg);
        printf("\nResult  : Pass");
            printf("\nGrade   : A Grade");
        else if(avg>=80&&avg<=90)
            printf("\nGrade   : B Grade");
        else if(avg>=70&&avg<=79)
            printf("\nGrade   : C Grade");
            printf("\nGrade   : D Grade");
        printf("\nResult  : Fail");
        printf("\nGrade   : No Grade");
    return 0;
To download raw file Click Here

List of Programs

Sample Programs

Switch Case in C

Conditional Operators in C

Goto Statement in C

While Loop Example Programs

Looping Statements in C

For Loop Example Programs

Array Examples in C

One Dimensional Array

Two Dimensional Array in C

String Example Programs in C

Functions Example Programs in C

Learn All in Tamil © Designed & Developed By Tutor Joes