Grandeza
Smash Master
So I'm taking my first computer programming class and we're learning a program called DrScheme although I think it is now DrRacket. So i was wondering if you could help me with a homework problem that I can't figure out =\
Write the (max2 x y) operator that evaluates to the larger argument.
Hint: Use these basic arithmetic operators: +,-,/, abs.
Test Cases:
(max2 3 5) -> 5
(max2 5 3) -> 5
(max2 3 3) -> 3
(max2 -2 -3) -> -2
Write the (max2 x y) operator that evaluates to the larger argument.
Hint: Use these basic arithmetic operators: +,-,/, abs.
Test Cases:
(max2 3 5) -> 5
(max2 5 3) -> 5
(max2 3 3) -> 3
(max2 -2 -3) -> -2