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

help-circle









  • 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
    




  • jaupsinluggies@feddit.uktoMemes@lemmy.mlSoon
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Maybe it’d be a good idea to use a word other than death, which is clearly being misinterpreted to mean killing people. “Dissolution of [x]” obviously isn’t as snappy, but it’s an improvement at least in terms of accuracy of intent.



  • The Norks Kims are world leaders and KC3 isn’t? Did I accidentally stumble into a .ml echo chamber?

    On looking at the OP’s list I was also wondering why Trooping the Colour wasn’t on it, as it is a military parade for the (official) birthday of one of the leaders in the G7.

    King Charles III is not symbolic; he is the ruler of the UK and the Commonwealth. He refers to Parliament as “my government” in his speeches and no new laws can be passed without his approval (Royal assent). He is the head of the military and the Church. So referring to Charles as a symbolic figurehead is factually inaccurate. Deferring power to Parliament doesn’t change that. Taking it up again may cause a constitutional crisis, but I believe it is an option.

    This seems like a fairly reliable source, on the grounds that although it’s “only” a blog, solicitors aren’t known for posting misinformation. https://www.milnerslaw.co.uk/could-king-charles-iii-dissolve-parliament/