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

How to Fight Overthinking or Negative Thoughts?

How to Combat Overthinking or Negative Thoughts? 1. Don’t Fight Your Thoughts Trying to suppress or control negative thoughts often backfire...