Question: The program is about to compare any two numbers. Then, it will display whether the number is minimum or maximum. Please use switch statement.
Here's my assignment question. I kinda need help on how to solve this. PLEASE GUYS!
> I HAVE TO USE SWITCH!!! IT's PART OF THE QUESTION
1 2 3 4 5 6 7 8 9 10 11 12 13
switch( (x>y) - (y>x) ) // int x, int y
{
case 1 :
// x is larger than y
break ;
case 0 :
// x is equal to y
break ;
default: // -1
// x is smaller than y
}