02. Write a program to a. Input index number b. Input marks c. Calculate mean/average of the marks entered d. Calculate grade of the marks entered e. Print the marks with grade f. Print the detailed report of marks which includes marks with grade and mean mark

PHOTO EMBED

Wed Mar 27 2024 16:38:06 GMT+0000 (Coordinated Universal Time)

Saved by @chanuth

#include <stdio.h>

int main (){
    
    int index;
    int mark1;
    int mark2;
    
    printf("Enter index number :");
    scanf("%d",&index);
    
    printf("Enter mark1 :");
    scanf("%d",&mark1);
    
    printf("Enter mark2 :");
    scanf("%d",&mark2);
    
    int avg = (mark1+mark2)/2;
    printf("Average of marks :%d\n",avg);
    
    if(avg>=35){
        printf("Grade = c");
    }else{
        printf("fail");
    }

    return 0;
}
content_copyCOPY