[Haskell-cafe] A tale of Project Euler

Sebastian Sylvan sebastian.sylvan at gmail.com
Wed Nov 28 18:24:47 EST 2007


On Nov 28, 2007 9:28 PM, Andrew Coppin <andrewcoppin at btinternet.com> wrote:
> 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?

cout, endl etc.



-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862


More information about the Haskell-Cafe mailing list