Tuesday, November 5, 2019



C language by fakhrul
#include<stdio.h>
int main (){
    int T,i,num1,num2,num3,first_number,second_number,third_number;
    scanf("%d",&T);
    for(i=1;i<=T;i++){
        scanf("%d %d %d",&num1,&num2,&num3);
        if(num1>num2){
            if(num1>num3){
                third_number=num1;
                if(num2>num3){
                    first_number=num3;
                    second_number=num2;
                }
                if(num2<num3){
                    first_number=num2;
                    second_number=num3;
                }
            }
            
            if(num1<num3){
                first_number=num2;
                second_number=num1;
                third_number=num3;
            }
            
        }
        if(num1<num2){
            if(num1<num3){
                 first_number=num1;
                 if(num2>num3){
                    second_number=num3;
                    third_number=num2;
                 }
                 if(num2<num3){
                    second_number=num2;
                    third_number=num3;
                 }
            }
            if(num1>num3){
                first_number=num3;
                second_number=num1;
                third_number=num2;
            }
        }
        printf("%d %d %d",first_number,second_number,third_number);
        printf("\n");
    }
    
    return 0;
}

0 Comments:

Post a Comment

Categories

About Me

My photo
I am Md Fakhrul Islam. I am a student of EEE of Daffodil International University I am expert in SEO and Graphic designing.

Contact Form

Name

Email *

Message *

Popular Posts