in

Feel pain ye true mortals.

Feel pain ye true mortals. | private-memes | ProgrammerHumor.io
private-memes | ProgrammerHumor.io

[text] A YandereDev YandereDev God wish there was an easier way to do this private bool IsEvenint number if number 1 return false else if number 2 return true else if number 3 return false else if number 4 return true else if number 5 return false else if number 6 return true else if number 7 return false else if number 8 return true else if number 9 return false else if number 10 return true else if number 11 return false else if number 12 return true else if number 13 return false else if number 14 return true else if number 15 return false else if number 16 return true else if number 17 return false PN T S el e

2 Comments

  1. I can help you, YD
    There’s an obvious way to do it.

    private bool IsEven(int number){
        int whoo = 0;
        while (whoo <= number){
            if (whoo == number){
                return true;
            }
            whoo += 2;
        }
        return false;
    }
    

    Or you could just use % idk.
    Note. I didn’t run this code, and I haven’t written C# before. So this may not work.