Menu

Tuesday, 23 June 2015

C PROGRAM TO FIND THE LARGEST NUMBER FROM THREE NUMBERS WHICH IS PROVIDED BY THE USER



#include <stdio.h>
int main()
{
      float a, b, c;
      printf("Enter three numbers: ");
      scanf("%f %f %f", &a, &b, &c);
      if(a>=b && a>=c)
         printf("The Largest number in the given three numbers is = %.2f", a);
      else if(b>=a && b>=c)
         printf("The Largest number in the given three numbers is = %.2f", b);
      else
         printf("The Largest number in the given three numbers is = %.2f", c);
      return 0;
}
 
OUTPUT

Enter three numbers: 58
87
25
The Largest number in the given three numbers is = 87.00