Saturday, 2 March 2019

eligible for the admission

#include<stdio.h>
main()
{
    int Math,Phy,Chem,Total,Total_MP;
    printf("Enter the number of Math:");
    scanf("%d",&Math);
    printf("Enter the number of Phy:");
    scanf("%d",&Phy);
    printf("Enter the number of Chem:");
    scanf("%d",&Chem);
    Total=Math+Phy+Chem;
    Total_MP=Math+Phy;
    if(Math>=60&&Phy>=50&&Chem>=40&&Total>=200)
    printf("The candidate is eligible for the admission");
    else
    {
        if(Total_MP>=150)
            printf("The candidate is eligible for the admission");
        else
            printf("The candidate is not eligible for the admission");
    }
}

No comments:

Post a Comment