It's Primes as far as the eye can see!
-
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.
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
That's democracy for you!
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
-
Ian Shlasko wrote:
give the right an answer
FTFY
Heh, yeah, you're right... It needs to be n+o-p... But hey, what's the point of testing when you're trying to write the worst code possible? (Still haven't tested... I was going to, but the compiler pulled a knife on me and said some very non-KSS things would happen if I tried)
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Bah, I can do better than that!
//TODO: Remove all comments before publishing. Real programmers don't need comments!
public function SuperMod(int n, int o) // o is a great variable, because it looks like a zero
{
int p = o; //Shorter variable names make the code run faster!
loopy: //Labels make me feel young again!
while (p < n) p += o;
if (p < n) goto loopy; //Just in case the compiler makes a mistake
int answer = p - n;
return answer;
}Ok, I think that's about as bad as I can make it, and though I didn't test it at all (Honestly, I think the compiler would come to life and slit my throat for even trying to execute this monstrosity), that should technically give the right answer... Unless 'o' is negative or zero, but validating parameters is so 20th century...
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Cut and pasted ! :laugh:
-
Cut and pasted ! :laugh:
Ok, but if you're gonna use that code, make sure to either fix the bug, or... uh... only test with (4,2).
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
This is terribly incorrect, because I stopped counting on an odd number, so there are more odd numbers than even. Thank you for your input. :D
You might get a more accurate result if you start at infinity and count backward.
-
You might get a more accurate result if you start at infinity and count backward.
PIEBALDconsult wrote:
You might get a more accurate result if you start at infinity and count backward
Great idea. I'm working on this now. :D
-
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.
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
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!
-
Ok, but if you're gonna use that code, make sure to either fix the bug, or... uh... only test with (4,2).
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)Testing ? If it fails, that's what Q&A is for. I don't need to test. :-D
-
PIEBALDconsult wrote:
You might get a more accurate result if you start at infinity and count backward
Great idea. I'm working on this now. :D
Chuck Norris already did it. Twice.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
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......:~
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
If he's the center of the universe, then technically shouldn't the keyboard back away from him?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
If he's the center of the universe, then technically shouldn't the keyboard back away from him?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Maybe it can't because the gravitational pull is so strong.
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
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.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
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.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Ian Shlasko wrote:
I don't know where this is going,
At the start I had visions of it heading towards Uranus.......
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
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...
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
Ian Shlasko wrote:
I don't know where this is going,
At the start I had visions of it heading towards Uranus.......
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
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?
-
Ian Shlasko wrote:
I don't know where this is going,
At the start I had visions of it heading towards Uranus.......
Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject
This whole chain of riffs was great though. Way to go out there.
-
Chuck Norris already did it. Twice.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
+2 for the chuck norris reference. I should've seen it coming, but I was busy with my countdown from infinity.
-
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?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
It was renamed... In 2620. Don't you watch Futurama?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)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?