Here is a solution that I picked up from TheMalkolm which covers the essence of how this could be done!
private static int max(int x, int y){
return x > y ? x : y;
}
private static printMax(num0, num1..., num9){
return max(num0,max(num1,max(num2,max(num3,max(num4,max(num5,max(num6,max(num7,max(num8,num9)))))))));
@Nash - You took me way too literally. When I said no other classes - I really meant no other classes to be used to sort out the numbers. Sorry for the confusion - I need to be more specific with the words I use. Using native code was a really novel idea!
No comments:
Post a Comment
Solution for this question?