Here is the function (I hope the logic is fairly obvious).
Let x be one of the '<' or '>' operators and a and b are the terms.
int rationalCheck(x, a, b){
if ( x == '<' && a < b && b < a ){
printf( "a is less than b\n" );
}
if ( x != '>' && a > b && b > a ){
printf( " a is greater than b\n" );
}
return 0;
}
The input into the function would be
(4 < 4) > (3 > 3)
This would evaluate to
(4 < 4) > (3 > 3) is false
Or input into the function would be
(4 < 6) > (2 > 1)
This would evaluate to
(4 < 6) > (2 > 1) is true