problem 9


#include <stdio.h>

int main() {
    int marks1, marks2, marks3, total;
    float percentage;

    printf("Enter the marks of three subjects: ");
    scanf("%d %d %d", &marks1, &marks2, &marks3);

    total = marks1 + marks2 + marks3;
    printf("Total: %d \n", total);
     
    percentage = (total * 100.0) / 300.0;
    printf("Percentage: %.2f%% \n", percentage);

    if (percentage >= 33.0) {
        printf("Student is pass");
    } else {
        printf("Student is fail");
    }

    return 0;
}




Contact Form