pass ya fail

 // Online C compiler to run C program online

#include<stdio.h>

#include<math.h>

#include<stdbool.h>


int main(){

    int phy , chem , maths ;

    

    printf(" enter phy marks : ");

    scanf (" %d ", &phy);

    printf(" enter chem marks : ");

    scanf (" %d ", &chem);

    printf(" enter maths marks : ");

    scanf (" %d ", &maths);

    float total = ( phy + chem + maths)/3;

    

    if (phy>= 30 && chem >= 30 && maths >= 30 && total >= 40){

        printf (" pass hai ");

    }

    else if (phy<30 || chem < 30 || maths < 30 ||total < 40){

        printf( " failed try again ");

    }

    

   

    

   

    

   


  

  

    

    

   

   

    

    return 0;

}


Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings