haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] A tale of Project Euler

Subject: Re: [Haskell-cafe] A tale of Project Euler
From: Andrew Coppin
Date: Wed, 28 Nov 2007 21:28:49 +0000
Michaeljohn Clement wrote:
Andrew Coppin wrote:
First, somebody else wrote this in C:

int n = 2 , m , primesFound = 0;

for( n=0;n < MAX_NUMBERS;n++ )
if( prime[n] )
{
primesFound++;

if( primesFound == 10001 )
  cout << n << " is the 10001st prime." << endl;

Um, I can't *believe* nobody else pointed this out, but that isn't C, it's C++.

Really? How can you tell?

Well anyway, the guy who wrote it said it's C. I suppose it was a simple oversight...

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>