2010-12-11 03:41:58 UTC
2.7485e+006 (which would be 2748500)
But the actual number on this occasion was 2748497 so I'm not getting a true print out of the prime number (the number I'm getting ends in 0 for a start which means it can be divided by 2)
Code is as follows:
include
include
using namespace std;
int main()
{
double currentInt = 2;
double mod = 0;
double total = 1;
time_t theTime;
while(currentInt > 0)
{
for(double x = 2; x <= currentInt; x++)
{
int result = static_cast
mod = currentInt - static_cast
if((mod == 0) && (x
{
time ( &theTime );
cout << total << ": " << currentInt << " Time: "
<< ctime (&theTime)<< endl;
total++;
break;
}
}
currentInt++;
}
return 0;
}