SHARE
TWEET

Untitled

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