|
Devil's in the (implementation) details
|
|
|
|
|
|
string[] messages = new string[]{null, "Fizz", "Buzz", "FizzBuzz"};
int acc = 810092048;
int c = 0;
for (int i=1; i < = N; ++i) {
c = acc & 3;
result += (c > 0 ? messages[c] : i.ToString()) + ", ";
acc = acc >> 2 | c << 28;
}
I know this is basically coding hell right here and someone's getting their pull request denied, but I ran across this and had to admire it.
|
|
|
|
|
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
Hey @chrismaunder I think we just found the next programming challenge!
Marc
|
|
|
|
|
You forgot the "-" between chris and maunder
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
That'll be @Chris-Maunder.
BTW, where are the coding challenge results ?
|
|
|
|
|
If oranges were a different color, would we still call them oranges?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Oranges colour depends on where it is grown. Oranges are subtropical fruit and turn orange when the temperature cools. In hot climates they stay green.
Generally when they turn orange they are starting to go off,, but people prefer that colour so the market complies.
So why aren't oranges called greens?
|
|
|
|
|
Because you eat greens with ham black-eyed peas, and cornbread.
|
|
|
|
|
Another perspective: if oranges were a different color normally, would the color orange still be orange?
|
|
|
|
|
Beets me.
|
|
|
|
|
Someone should!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Yes please.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Argh. I'm seeing red, although I should probably be green with envy.
/ravi
|
|
|
|
|
... weird ... can't seem to quote any signature words ...
(shoots self in foot with felt hat)
|
|
|
|
|
invented red to eat capt then blue to eat ration then should we eat orange? all you can
|
|
|
|
|
yes, because the word comes from the fruit.
|
|
|
|
|
|
That color would be called orange.
|
|
|
|
|
I've got an orange tree in the garden. It's more green and brown than orange.
veni bibi saltavi
|
|
|
|
|
Yes, we would call them #ffe033.
|
|
|
|
|
Orange is not called as "Orange" because of colour. The colour comes after the existence of the fruit Orange.
|
|
|
|
|
Wasn't the colour named after the fruit*?
I'm pretty sure that "orange" is a new colour, which used to be just a red.
* Or we may have taken it from the Dutch royals ("oranje"), who used it as their colour, but who wants to admit that?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
The real existential question you should ponder:
Why is a carrot more orange than an orange?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Yes - the colour gets its name from the fruit, and not the other way round. It came into English from Arabic via Spanish - it was Naranja which mutated into Norange in English, where a norange became an orange.
Therefore the fruit would still be an orange, but the colour would be different.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|