# You know you're bored when....

#### Pretender

##### Banned
.....you write a program that finds all primes between 1 and 2.1 billion.

Anyone else?

#### Mday

##### Lifer
or you posted the 3 threads i did.

#### konichiwa

##### Lifer
...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
Yeah, I was gonna say 'when you stay up too late and post wacky things on OT, like me tonight!&quot;

#### Duckers

##### Platinum Member
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
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
Clickomotron has a new scoring system. Look for the debut tomorrow.

clickomotron?

#### Killbat

##### Diamond Member
You'll have to wait 'till tomorrow, just like everyone else. It's the third 90min program, and it's a game this time.

 I've said too much. Sleeping now.

#### Farbio

##### Diamond Member
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

#### Engine

##### Senior member
>>&quot;I wonder what the highest prime number found is so far&quot;...

(2^6,972,593)-1

#### Pretender

##### Banned
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.

#### Engine

##### Senior member
Heh... it actually IS a distributed computing project. Not nearly as big as distributed.net or seti@home, but it's one of the oldest ones, as far as I know.

http://www.mersenne.org/prime.htm

#### Chooie

##### Platinum Member
Ever wonder why people use Prime95 to burn in and test computers?

#### Pretender

##### Banned
Well, in my mind I'm still the computer genius who first though up using a computer to determine primes. So there

#### Farbio

##### Diamond Member
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

The highest prime number found so far has 150,000 digits, so Andrew Wiles says.

#### Engine

##### Senior member
150,000 digits? The last Mersenne prime found was over 3 million, I believe.

#### Teatowel

##### Senior member

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

#### Engine

##### Senior member
Hehe
THat would explain it. GIMPS found that 3 million digit one about a year and a half ago, if I remember correctly.