C Program to find largest number among three numbers

Find largest number among three numbers


Write a C Program to find largest number among three numbers. Here’s simple Program to find largest number among three numbers in C Programming Language.


Below is the source code for C Program to find largest number among three numbers which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :


/*  C Program to find largest number among three numbers  */

#include <stdio.h>

int main()
{
    int a,b,c;
    int largest;

    printf("Enter first number :: ");
    scanf("%d",&a);
    printf("\nEnter Second number :: ");
    scanf("%d",&b);
    printf("\nEnter third number :: ");
    scanf("%d",&c);

    if(a>b && a>c)
        largest=a;
    else if(b>a && b>c)
        largest=b;
    else
        largest=c;

    printf("\nLargest number is = %d \n",largest);

    return 0;
}

OUTPUT : :


Enter first number :: 4

Enter Second number :: 5

Enter third number :: 2

Largest number is = 5

Above is the source code for C Program to calculate largest number among three numbers which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

Leave a Reply