Ad
Fundamentals
Numbers
Data Types
Integers
Code
Diff
  • class Odd
      def odd(n)
        n % 2 == 1
      end
    end
    • public static class Kata
    • {
    • public static bool IsOdd(int input)
    • {
    • return ((input % 10 == 1) || (input % 10 == 3) || (input % 10 == 5) || (input % 10 == 7) || (input % 10 == 9));
    • }
    • }
    • class Odd
    • def odd(n)
    • n % 2 == 1
    • end
    • end