PLZ help me with the problem in the code I am not understanding

#include <stdio.h>

int main(void) {
	int a , b , c , max_num , max_num2 , max ; 
	short int T , n = 1;
	scanf("%d" , &T);
	while(n<=T){
	    scanf("%d%d%d" , &a,&b,&c);
	    if(a>b && a>c){
	        max_num = a;
	    }
	    else if(b>a && b>c){
	        max_num = b ; 
	    }
	    else{
	        max_num = c ; 
	    }
	    if(a<max_num && a>b || a>c){
	        max_num2 = a;
	    }
	    else if(b<max_num && b>c || b>a){
	        max_num2 = b;
	    }
	    else if(c<max_num && c>a || c>b){
	        max_num2 = c ; 
	    }
	    max = max_num + max_num2 ;
	    printf("%d\n" , max);
	    n++;
	}
	return 0;
}

the constraints were that t has to be from 1 to 10^4
and a , b, c has to be from 1 to 10^8
THIS PROGRAM IS NOT GETTING SUBMITTED UNFORTUNATELY

A little crazy solution. From the code I assume that you must print the sum of the 2 largest numbers.
This sum equals sum of a, b, and c minus the minimum of these numbers. How to find minimum? Set it to a. If b is smaller than min, set it to b, if c is smaller than min, set it to c.