Language: C

#include <stdio.h>                                                                     
 
typedef enum { 
    false, 
    true 
} boolean_t; 
 
void sorter ( int* data, int elements ) 
{ 
    int i, j, cmp, key; 
    for ( i = 0; i < elements; i++ ) 
    {   
        key = data[i]; 
        for ( j = i; j > 0; j-- ) 
        {   
            cmp = data[j - 1]; 
            if ( key < cmp ) 
            {   
                break; 
            }   
            else 
            {   
                data[j] = cmp; 
            }   
        }   
        data[j] = key; 
    }   
} 
 
int sq ( int input ) 
{ 
    return input * input; 
} 
 
// length[] should be sorted 
// assuming number of elements of length[] is 3 
boolean_t alg ( int* length ) 
{ 
    if ( sq(length[0]) == sq(length[1]) + sq(length[2]) ) 
        return true; 
    else 
        return false; 
} 
#include <stdio.h>                                                                     
 
typedef enum { 
    false, 
    true 
} boolean_t; 
 
void sorter ( int* data, int elements ) 
{ 
    int i, j, cmp, key; 
    for ( i = 0; i < elements; i++ ) 
    {   
        key = data[i]; 
        for ( j = i; j > 0; j-- ) 
        {   
            cmp = data[j - 1]; 
            if ( key < cmp ) 
            {   
                break; 
            }   
            else 
            {   
                data[j] = cmp; 
            }   
        }   
        data[j] = key; 
    }   
} 
 
int sq ( int input ) 
{ 
    return input * input; 
} 
 
// length[] should be sorted 
// assuming number of elements of length[] is 3 
boolean_t alg ( int* length ) 
{ 
    if ( sq(length[0]) == sq(length[1]) + sq(length[2]) ) 
        return true; 
    else 
        return false; 
} 

int main ( void ) 
{
    boolean_t result;
    int linenum, i; 
    int data[3]; 
 
    scanf( "%d", &linenum ); 
 
    for ( i = 0; i < linenum; i++ ) 
    { 
        scanf( "%d %d %d", &data[0], &data[1], &data[2] ); 
        sorter( data, 3 ); 
        if ( alg(data) ) 
            puts( "YES" ); 
        else 
            puts( "NO" ); 
    } 
 
    return 0; 
}   

Compiler output:
main.c:47:5: error: redeclaration of enumerator 'false'
   47 |     false,
      |     ^~~~~
main.c:4:5: note: previous definition of 'false' with type 'enum <anonymous>'
    4 |     false,
      |     ^~~~~
main.c:48:5: error: redeclaration of enumerator 'true'
   48 |     true
      |     ^~~~
main.c:5:5: note: previous definition of 'true' with type 'enum <anonymous>'
    5 |     true
      |     ^~~~
main.c:49:3: error: conflicting types for 'boolean_t'; have 'enum <anonymous>'
   49 | } boolean_t;
      |   ^~~~~~~~~
main.c:6:3: note: previous declaration of 'boolean_t' with type 'boolean_t'
    6 | } boolean_t;
      |   ^~~~~~~~~
main.c:51:6: error: redefinition of 'sorter'
   51 | void sorter ( int* data, int elements )
      |      ^~~~~~
main.c:8:6: note: previous definition of 'sorter' with type 'void(int *, int)'
    8 | void sorter ( int* data, int elements )
      |      ^~~~~~
main.c:73:5: error: redefinition of 'sq'
   73 | int sq ( int input )
      |     ^~
main.c:30:5: note: previous definition of 'sq' with type 'int(int)'
   30 | int sq ( int input )
      |     ^~
main.c:80:11: error: conflicting types for 'alg'; have 'boolean_t(int *)'
   80 | boolean_t alg ( int* length )
      |           ^~~
main.c:37:11: note: previous definition of 'alg' with type 'boolean_t(int *)'
   37 | boolean_t alg ( int* length )
      |           ^~~