You are viewing a single comment's thread. Return to all comments →
in C# // Complete the catAndMouse function below. static string catAndMouse(int x, int y, int z) { //Console.WriteLine("z-x == z-y " + (z-x).ToString() + " " + (z-y).ToString()); if (Math.Abs(z-x) == Math.Abs(z-y)) { return "Mouse C"; } else { if (Math.Abs(z-x) > Math.Abs(z-y)) { return "Cat B"; } else { return "Cat A"; } }
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 →
in C# // Complete the catAndMouse function below. static string catAndMouse(int x, int y, int z) { //Console.WriteLine("z-x == z-y " + (z-x).ToString() + " " + (z-y).ToString()); if (Math.Abs(z-x) == Math.Abs(z-y)) { return "Mouse C"; } else { if (Math.Abs(z-x) > Math.Abs(z-y)) { return "Cat B"; } else { return "Cat A"; } }