5. Write a program to receive marks of physics, chemistry & maths from user & check its eligibility for course if a) Marks of physics > 40 b) Marks of chemistry > 50 c) Marks of math’s > 60 d) Total of physics & math’s marks > 150 or e) Total of three subjects marks > 200

 SOURCE CODE:


#include <stdio.h>

int main()
{   float p,c,m;
    printf("enter the marks of physics, chemistry and maths\n");
    scanf("%f %f %f",&p,&c,&m);
    if((p>40 && c>50 && m>60 && (p+m)>150) || ((p+c+m)>200))
    printf("eligible for course");
    else
    printf("not eligible for course");
    return 0;
}



Comments