Advertisement
Istanvir389

Greatest Number From 3 Input

Jul 21st, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3.  
  4. {
  5.     double a,b,c;
  6.     printf("Enter the value of a==");
  7.     scanf("%lf",&a);
  8.     printf("Enter the value of b==");
  9.     scanf("%lf",&b);
  10.     printf("Enter the value of c==");
  11.     scanf("%lf",&c);
  12.  
  13.     if(a>b && a>c)
  14.      {
  15.       printf("The largest number is %lf",a);}
  16.  
  17.  
  18.     else if(b>a && b>c)
  19.        {
  20.         printf("The largest number is %lf", b);}
  21.  
  22.  
  23.     else if(c>b && c>a)
  24.         {
  25.          printf("The largest number is %lf",c); }
  26.  
  27.     else if(a==b&& b==c)
  28.         printf("The numbers are equal");
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement