You know you're bored when....

konichiwa

Lifer
Oct 9, 1999
15,077
2
0
...you post a thread on an internet bulletin board about how you created a program that finds all primes between 1 and 2.1 billion, instead of going to your local family psychiatrist.
 

Isla

Elite member
Sep 12, 2000
7,749
2
0
Yeah, I was gonna say 'when you stay up too late and post wacky things on OT, like me tonight!"
 

Duckers

Platinum Member
Mar 30, 2000
2,089
1
0
Pretender,

This afternoon I was trying to write a C++ program that could identify whether a number is prime or not!

anyway, this is what i was able to write; but couldn't completely get it to work; take a look at it:
( I assume you said that for some reason ;) )


#include <iostream.h>
int main ()
{

int number;

cout<<&quot;Enter an integer: &quot;;
cin>>number;


for (int x=2; x <=100; x++){;

if ((number % x == 0) &amp;&amp; (x != number))
cout<<&quot;NOT Prime&quot;<<endl;

else
cout<<&quot;Prime&quot;<<endl;
}
return (0);
}
 

Pretender

Banned
Mar 14, 2000
7,192
0
0
actually when I was walking home I was thinking &quot;I wonder what the highest prime number found is so far&quot;...then I decided to write a program...I'll modify it to go beyond 2 billion later, but it'll take more work. If you want a copy of the code PM me.


Damn I need a life ;)



 

Killbat

Diamond Member
Jan 9, 2000
6,641
1
0
You'll have to wait 'till tomorrow, just like everyone else. :) It's the third 90min program, and it's a game this time.

[edit] I've said too much. Sleeping now. :p
 

Farbio

Diamond Member
Apr 9, 2000
3,855
0
0
uh oh, killbat has a new program...somehow i sense that he will be banned soon and the forums will be much slower to load:)
 

Pretender

Banned
Mar 14, 2000
7,192
0
0
Alright, I'll start looking from there. Damn this should be a distributed computing project, it'll probably take me like months just to try the next number after that.
 

Chooie

Platinum Member
Nov 8, 1999
2,266
4
81
Ever wonder why people use Prime95 to burn in and test computers? :p
 

Pretender

Banned
Mar 14, 2000
7,192
0
0
Well, in my mind I'm still the computer genius who first though up using a computer to determine primes. So there :p
 

Farbio

Diamond Member
Apr 9, 2000
3,855
0
0
yea, and in my mind pretender i'm an incredibly handsome stud that has women swooning w/ every step i take

















oh wait, that is me!:)
 

Teatowel

Senior member
Sep 22, 2000
496
1
81

um...I guess you may be right... the source I took that figure from was about 5 years old :eek:
 

Engine

Senior member
Oct 11, 1999
519
0
0
Hehe :)
THat would explain it. GIMPS found that 3 million digit one about a year and a half ago, if I remember correctly.