• 0 Posts
  • 16 Comments
Joined 6 months ago
cake
Cake day: June 6th, 2025

help-circle



  • What do you mean nothing to do?

    The USA has been self governing nation for long enough for them to solve their own problems, especially as they have a staggering amount of wealth and security.

    Quite a few ex-colonies have done rather well for themselves too, so “the destruction our expansionist empire caused” can be recovered from. One can only wonder why it’s our fault some places haven’t recovered yet.

    I also wonder which destructive expansionist empire you’re part of, Mr Pot.








  • This works for both positive and negative numbers:

    private static bool isEven(int number)
    {
    	bool result = true;
    
    	while (number < 0)
    	{
    		number = number - 1;
    		if (result == true)
    			result = false;
    		else
    			result = true;
    	}
    	while (number > 0)
    	{
    		number = number - 1;
    		if (result == true)
    			result = false;
    		else
    			result = true;
    	}
    	return result;
    }
    

    Output:

    isEven(4) = True
    isEven(5) = False
    isEven(-4) = True
    isEven(-5) = False