SHARE
TWEET

find largest numbers

samrina_sarkar_7 Jun 19th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,b,c;
  5.     printf("enter three number");
  6.     scanf("%d%d%d",&a,&b,&c);
  7.     if(a>b)
  8.     {
  9.         if(a>c)
  10.         {
  11.             printf("the largest number is %d",a);
  12.         }
  13.         else
  14.         {
  15.             printf("the largest number is %d",c);
  16.         }
  17.     }
  18.     else if(b>a)
  19.     {
  20.         if(b>c)
  21.         {
  22.             printf("the largest number is %d",b);
  23.         }
  24.         else
  25.         {
  26.             printf("the largest number is %d",c);
  27.         }
  28.     }
  29.     else
  30.     {
  31.         printf("the largest number is %d",c);
  32.     }
  33.     //main();
  34.     return 0;
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top