Wednesday, October 28, 2020

C program to find the greatest of two numbers

#include <stdio.h>

int main() 

{

    int a,b;

    printf("Enter a & b:");

    scanf("%d%d",&a,&b);

    if(a>b)

    {

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

    }

    else

    {

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

    }

    return 0;

}

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...