Ad
  • Custom User Avatar

    for(i=0; i<arrLength; i++)
    if(arr[i] == arr[i+1])

    This is wrong.

  • Custom User Avatar

    A function can't return multiple values. You don't need a break in this case because once "Eight" is returned, the function doesn't continue.

  • Custom User Avatar

    You have to pay attention: without break; the switch executes all code after finding a match (for example: if imput is 8 your function will return "Eight" and then "Nine" because a break; is missing)!

  • Custom User Avatar

    You don't have a case for 0. When number=0, your code needs to return "Zero". But because there is no 0 case, it goes to the default and returns number instead.