Finding Largest of Two Numbers
In this, we are going to write a program to find largest of two numbers in C Programming.



#include <stdio.h>
int main()
{
    int a, b;
    printf("Enter two integers to find greatest...\n");
    printf("Enter first integer : \n");
    scanf("%d", &a);
    printf("Enter second integer : \n");
    scanf("%d", &b);
    printf("You entered : %d %d \n", a, b);
    if (a > b)
    {
        printf("%d is greater \n", a);
    }
    else if (a < b)
    {
        printf("%d is greater \n", b);
    }
    else
    {
        printf("both are equal \n");
    }
    return 0;
}
//.........Coded By ARADHANA MISHRA

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post