C Program for Largest Among Two Numbers

In this program, you'll learn to print largest among two numbers.



Source Code
#include<stdio.h>

int main()
{
    int a, b;
    printf("Enter value of two variables: ");
    scanf("%d%d", &a, &b);

    if(a > b)
    {
        printf("a is greater");
    }
    else
    {
        printf("b is greater");
    }
    return 0;
}
Output
Enter value of two variables: 75 89
b is greater





"Coding Hub - Learn to code" app now available on Google Play Store