SHARE
TWEET

Untitled

a guest Feb 17th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4.  
  5. int main(){
  6.     int t1,t2,t3;
  7.     scanf("%d",&t1);   
  8.     scanf("%d",&t2);   
  9.     scanf("%d",&t3);
  10.    
  11.     if( t1<t2 && t2<t3)//t1<t2<t3
  12.     {
  13.         printf("1\n2\n3");}
  14.     else if (t2<t1 && t1<t3)//t2<t1<t3
  15.     {
  16.         printf("2\n1\n3");
  17.         }
  18.     else if (t1<t3 && t3<t2)//t1<t3<t2
  19.     {
  20.         printf("1\n3\n2");
  21.     }
  22.     else if (t3<t1 && t1<t2)//t3<t1<t2
  23.     {   printf("2\n3\n1");}  
  24.     else if (t2<t3 && t3<t1) // t2<t3<t1
  25.     {
  26.         printf("3\n1\n2");
  27.     }
  28.     else{
  29.         printf("3\n2\n1");//t3<t2<t1
  30. }
  31.     getch();
  32.    
  33.     return 0;
  34. }
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
Top