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
Post a Comment