Thursday, October 29, 2020

C program of the greatest or the equal number amongst two given numbers

#include <stdio.h>

int main() {

    int x,y;

    printf("Enter x & y:");

    scanf("%d %d",&x,&y);

    if(x>y)

    {

        printf("x=%d is greatest",x);

    }

    else if(y>x)

    {

        printf("y=%d is greatest",y);

    }

    else

    {

        printf("x=y=%d",x);

    }

}

No comments:

Post a Comment

Everyone Is Fighting a Battle You Can't See ❤️ | A Simple Reminder to Be Kind

 Hi, namaste Krishna. So today we will be talking about that everyone is going through something in their life. Be it you, be it your friend...