You are viewing a single thread.
View all comments
2 points
*

Good solution! I think you should show the last 3 lines that makes it work tho. FIFY:

private bool IsEven(int number){
    if (number == 1) return false;
    else if (number == 2) return true;
    else if (number == 0) return true;
    else if (number == -1) return false;
    else return !IsEven(abs(number) - 1);
}
permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7.2K

    Monthly active users

  • 954

    Posts

  • 36K

    Comments