How to use bigger number in C Language

Program to use if-else in C Language


#include <stdio.h>
int main()
{
    int a, b;
    printf("Enter a two numbers : ");
    scanf("%d%d", &a, &b);
    if (a > b)
    {
        printf("Bigger number=%d\n", a);
    }
    else
    {
        printf("Bigger number=%d\n", b);
    }
    return 0;
}

output


Enter two numbers : 15
10
Bigger number=15

Steps / Description

  1. Declare integer variable a and b
  2. printf inbuild function to display two numbers
  3. Will print the value given by scanf
  4. if statement a grater b
  5. printf inbuild function to display bigger number variable a