C/C++ program for result making






// Program to calculate a student result of three subjects. 

 #include <stdio.h>

int main(){
    int physics, chemistry, maths;
    float total;

    printf("Enter Physics marks:");
    scanf("%d", &physics);
    printf("Enter Chemistry marks:");
    scanf("%d", &chemistry);
    printf("Enter Maths marks:");
    scanf("%d", &maths);
    total = (physics+chemistry+maths);
    if (total<40 ||physics<33||chemistry<33||maths<33)
    {
        printf("Your total percentage is %f and You are FAIL\n", total/3);
    }
    else{printf("Your total percentage is %f and You are PASS\n", total/3);}
    }

Comments

Popular posts from this blog

Site to calculate electricity bill using HTML, CSS and Java Script

Functions and recrusion.

Quick calculator using HTML,CSS and Java Script.