|
PIEBALDconsult wrote: It's confusing to have a negative sign for each number place Ha! So true. I hadn't even noticed it. I'm blind.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I was just watching it count down some more -- 00 doesn't have a negative sign.
|
|
|
|
|
What do you get when you cross a joke with a rhetorical question?
---
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
|
|
|
|
|
This is the whole of a would-be Tip submitted today:
public class Class1
{
static void Main(string[] args)
{
Console.WriteLine("Enter a Number");
int num = int.Parse(Console.ReadLine());
for (int i = 1; i <=num ; i++)
{
if(i==2)
Console.WriteLine(2);
if (i % 2 != 0)
{
Console.WriteLine(i);
}
}
}
}
No text, no explanation - the author (I can only assume he works for Mindfire, it's about their level) clearly felt that it spoke for itself.
And boy, does it ever! This, ladies-n-gentlemen, is a Prime Number generator according to the author.
So...I tried it...
According to this code, the prime numbers under 26 are:
1
2
3
5
7
9
11
13
15
17
19
21
23
25 Now, call me old fashioned, but in my day, 9, 15 and 21 were divisible by 3, and both 15 and 25 were divisible by 5...
So which is wrong? The Code? Or the Laws of Mathematics? Only the author can tell...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: call me old fashioned, but in my day, 9, 15 and 21 were divisible by 3 Ya, but that's also back when Pluto was a planet. We live in a very different place now.
This user submitted this in QA, got closed, and resubmitted it in QA. I told him to post as a tip but apparently he didn't realize some explanation should be added. Or, the important part, THAT IT SHOULD WORK!
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
RyanDev wrote: back when Pluto was a planet.
What? You mean he wasn't always a dog?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
RyanDev wrote: but that's also back when Pluto was a planet
There was a thing on the telly recently that stated it had been voted back in as a planet.
|
|
|
|
|
True fans never gave up hope.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
That's democracy for you!
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
DaveAuld wrote: it had been voted back in as a planet
That is such a coincidence because I've just been voted in as a planet too.
Very cool. I hope to be voted in as a Sun one day so I can go by the name Apollo.
It's such a cool name.
Plus then all you people will have to rotate around me and I'll be the center of your Universe.
Yes, the sun is the center of the Universe.
I pre-emptively struck on your future humor that I didn't know that the sun was the center of a solar system. Wham!
|
|
|
|
|
back.....away.....from.....the.....keyboard......
|
|
|
|
|
If he's the center of the universe, then technically shouldn't the keyboard back away from him?
|
|
|
|
|
Maybe it can't because the gravitational pull is so strong.
|
|
|
|
|
Well, then it's time to invent an escape-assist rocket for a keyboard. Or honestly, maybe you should just let it collapse into him... If you add enough keyboards (And divert the entire manufacturing capacity of the human race to this for several million years), you could turn him into a black hole.
I don't know where this is going, but my gut tells me it's just one punchline away from being funny.
|
|
|
|
|
Ian Shlasko wrote: I don't know where this is going,
At the start I had visions of it heading towards Uranus.......
|
|
|
|
|
DaveAuld wrote: At the start I had visions of it heading towards Uranus.......
Ok, that's a start, but now you have to combine it with the semi-joke... Somehow connect that to a black h--
Ya know what... Let's just let that one go-- Err, no, don't do that... Uh... Just pass-- No...
|
|
|
|
|
Every time planets or orbits or space or universe or anything astronomical then there is the required mention of the 7th planet in our solar system.
We really need a rename on that planet, don't you think?
|
|
|
|
|
It was renamed... In 2620. Don't you watch Futurama?
|
|
|
|
|
I haven't watched Futurama, because I boycotted The Simpsons in Season 2 and haven't watched anything by Matt Groening since. I know. Pretty cool, huh?
|
|
|
|
|
This whole chain of riffs was great though. Way to go out there.
|
|
|
|
|
You know, as someone who's been messing around in Project Euler lately and could now code a Sieve of Eratosthenes* in his sleep, that algorithm makes me cry a little inside.
(You know, it's easier to code the algorithm than to spell that guy's name...)
|
|
|
|
|
All odd numbers are prime, right? Let me check. Yep, all odd numbers are prime.
Makes it a lot easier to count by the primes.
Also, are there more odd numbers or even numbers? I know the answer, but it's a puzzle for you.
|
|
|
|
|
newton.saber wrote: Also, are there more odd numbers or even numbers? I know the answer, but it's a puzzle for you.
I dunno, let's find out... You start naming odd numbers, and I'll start naming even numbers... Whoever can name more of them wins!
By the way, is Infinity odd or even? I mean, it's a sideways 8, and 8 is even... But since it's sideways, that's a little odd, right? It's also kind of a car, except they spell it oddly, so maybe the original spelling is even... My head hurts...
|
|
|
|
|
Quote: By the way, is Infinity odd or even? I mean, it's a sideways 8, and 8 is even... But since it's sideways, that's a little odd, right?
Please, stop! You're hurting me!
|
|
|
|
|
newton.saber wrote: it's a puzzle for you.
Not really: there are an infinite quantity of each.
The way we define "more", "less", and "equal" for infinite quantities is as follows. For two collections A and B (say A are the even numbers and B are the odd numbers) we say that
If you can associate every item in A with a unique item in B, and vice versa, then A and B are the same size.
If you can associate every item in A with a unique item in B, but not vice versa, then B is bigger than A.
If you can associate every item in B with a unique item in A, but not vice versa, then A is bigger than B.
In this case you can associate every even number n with the odd number n+1, and you can associate every odd number m with the even number m−1 (assuming 0 is even) so therefore there are just as many odd numbers as even numbers.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|