Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int t1,t2,t3;
- scanf("%d",&t1);
- scanf("%d",&t2);
- scanf("%d",&t3);
- if (t1 >1000 || t2 >1000 || t3 >1000 || t1<1 || t2<1 ||t3<1){
- return 0;}
- else if( t1<t2 && t2<t3) //t1<t2<t3
- {
- printf("1\n2\n3");}
- else if (t2<t1 && t1<t3) //t2<t1<t3
- {
- printf("2\n1\n3");
- }
- else if (t1<t3 && t3<t2)//t1<t3<t2
- {
- printf("1\n3\n2");
- }
- else if (t3<t1 && t1<t2) //t3<t1<t2
- { printf("2\n3\n1");}
- else if (t2<t3 && t3<t1) // t2<t3<t1
- {
- printf("3\n1\n2");
- }
- else{
- printf("3\n2\n1"); //t3<t2<t1
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement