Advertisement
Samiul_Islam_Abir

3

Jun 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int x,y,z;
  5.     printf("Enter any three number:");
  6.     scanf("%d%d%d",&x,&y,&z);
  7.     if(x>y)
  8.     {
  9.         if (x>z)
  10.         {
  11.             printf("Largest number is %d",x);
  12.         }
  13.         else
  14.         {
  15.             printf("Largest number is %d",z);
  16.         }
  17.     }
  18.     else if(y>x)
  19.     {
  20.         if(y>z)
  21.         {
  22.             printf("Largest number is %d",y);
  23.         }
  24.         else
  25.         {
  26.             printf("Largest number is %d",z);
  27.         }
  28.  
  29.  
  30.     }
  31.     else
  32.     {
  33.         printf("Largest number is %d",z);
  34.     }
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement