C Program for Largest Among Two Numbers

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

Source Code

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

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

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