Ad
Fundamentals
Numbers
Data Types
Integers
Code
Diff
  • public static class Kata
    {
        public static bool IsOdd(int input)
        {
          
          
            if (input % 2 == 0)
            {      
             return false;
            }
            else
            {
             return true;
            }
        }
    }
    • public static class Kata
    • {
    • public static bool IsOdd(int input)
    • {
    • int x = 97531;
    • while (x > 0)
    • {
    • if (input % 10 == x % 10) return true;
    • x /= 10;
    • }
    • return false;
    • if (input % 2 == 0)
    • {
    • return false;
    • }
    • else
    • {
    • return true;
    • }
    • }
    • }