#include <stdio.h>
int main()
{
int p,c,m,tmpc,tmp;
printf("Eligibility Criteria: \n");
printf("Marks in Maths: >60\n");
printf("and Marks in Physics: >40\n");
printf("and Marks in Chemistry: >50\n");
printf("and Total in all three subject: >200\n");
printf("or Total in Maths and Physics: >150\n");
printf("-------------------------------------\n");
printf("Input the marks obtained in Physics: ");
scanf("%d",&p);
printf("Input the marks obtained in Chemistry: ");
scanf("%d",&c);
printf("Input the marks obtained in Mathematics: ");
scanf("%d",&m);
printf("Total marks of Maths, Physics and Chemistry: %d\n",m+p+c);
printf("Total marks of Maths and Physics: %d\n",m+p);
if (m>60)
if(p>40)
if(c>50)
if((m+p+c)>200||(m+p)>=150)
printf("The candidate is eligible for admission.\n");
else
printf("The candidate is not eligible.\n");
else
printf("The candidate is not eligible.\n");
else
printf("The candidate is eligible.\n");
else printf("The candidate is not eligible.\n");
return 0;
}

0 Comments