You are viewing a single comment's thread. Return to all comments →
Slight tweak:
static String catAndMouse(int x, int y, int z) { switch(Integer.compare(Math.abs(z-x), Math.abs(z-y))){ case -1: return "Cat A"; case 1: return "Cat B"; default: return "Mouse C"; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Cats and a Mouse
You are viewing a single comment's thread. Return to all comments →
Slight tweak: