Click the Follow Button

C: Pass Or Fail Cheak

 PROGRAM:

#include <stdio.h>

int main()
{
    int p, c, m, t;
    printf("enter your number of Physics: ");
    scanf("%d", &p);
    printf("enter your number of chemistry: ");
    scanf("%d", &c);
    printf("enter your number of mathematics: ");
    scanf("%d", &m);
    t = p + c + m;

    if (t > 40 && p > 33 && c > 33 && m > 33)
    {
        printf("You have passed.");
    }
    else
        printf("You have failed.");

    return 0;
}

OUTPUT:

enter your number of Physics: 35

enter your number of chemistry: 36

enter your number of mathematics: 50

You have passed.

Comments

Popular Posts

TIC - TAC - TOE

Prime and not prime number

do_while loop is to do something again and again