Ad
  • Custom User Avatar

    erhm, did you not notice the top solution? ;)

  • Custom User Avatar

    I know this is 17 months old, but thank you for this! I actually didnt know you could remove the else and just add another return for "Odd".

  • Custom User Avatar

    The Func part is a delegate and the (x) => ... part is a lambda expresion but I don't know the advantage of using them here.

  • Custom User Avatar

    As g964 says in your post below, you are missing a using statement - add using System; above everything else in your solution. Math is short for System.Math in C#, but you need the initial using statement for this to work.

    Alternatively you could replace Math with System.Math everywhere in your solution.

  • Custom User Avatar

    Please before posting issues look at the top of the page: 4975 people passed the C# kata so you could have seen that it's not an issue of the kata but a problem of your code. To use Math.Pow you need "using System;".

  • Custom User Avatar

    In that case a == b, so it's indifferent which of them is returned. In the current case b will be returned, but the condition could be a >= b as well in which case a would be returned when the are equal.

  • Custom User Avatar

    then either one is ok