C Program to find largest among three numbers

Simple C program to find largest number among three numbers.
#include<stdio.h>
int main()
{
 int a,b,c;
 printf("Enter first number: ");
 scanf("%d",&a);
 printf("Enter second number: ");
 scanf("%d",&b);
 printf("Enter third number: ");
 scanf("%d",&c);
 if(a>b&&a>c)
 {
  printf("Largest= %d\n",a);
 }
 if(b>a&&b>c)
 {
  printf("Largetst = %d\n",b);
 }
 if(c>a&&c>b)
 {
 
 printf("Largest= %d",c);
    }
 return 0;
}


Popular posts from this blog