Ad
Code
Diff
  • using System;
    
    class Kata
    {
        public static void Main()
        {
            Console.WriteLine("Hello, C#!");
        }
    }
    • using System;
    • class Kata
    • {
    • public static void Main()
    • {
    • string greeting = "Hello";
    • string language = "C#";
    • Console.WriteLine($"{greeting}, {language}!");
    • Console.WriteLine("Hello, C#!");
    • }
    • }
Fundamentals
Numbers
Data Types
Integers
Code
Diff
  • public static class Kata
    {
        public static bool IsOdd(int input, int div)
        {
            return input % div == 0;
        }
    }
    • public static class Kata
    • {
    • public static bool IsOdd(int input, int div)
    • {
    • if (input % div == 0)
    • return true;
    • return false;
    • return input % div == 0;
    • }
    • }
Fundamentals
Numbers
Data Types
Integers
Code
Diff
  • public static class Kata
    {
        public static bool IsOdd(int input)
        {
            return input % 2 != 0;
        }
    }
    • public static class Kata
    • {
    • public static bool IsOdd(int input)
    • {
    • return (input & 1) == 1;
    • return input % 2 != 0;
    • }
    • }