Ad
Fundamentals
Strings
Data Types
Logic

Write a function that returns string:

"Fizz" when the number is divisible by 3.
"Buzz" when the number is divisible by 5.
"FizzBuzz" when the number is divisible by 3 and 5.

public class FizzBuzz
 {
   public string GetOutput(int number)
   {
     if ((number % 3 == 0) && (number % 5 == 0))
       return "FizzBuzz";

     else if (number % 3 == 0)
       return "Fizz";

     else if (number % 5 == 0)
       return "Buzz";

    else return number.ToString(); 
   }
}
Fundamentals
Numbers
Data Types
Logic

Write a method that returns a greater number.

Perfect task for begginers!
Welcome to CodeWars!
public class Math
{
  public int Max(int a, int b)
  {
    return (a > b) ? a : b;
  }
}