[Haskell-cafe] Project Euler Problem 357 in Haskell

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Tue Nov 8 13:33:15 CET 2011


On 8 November 2011 23:29, mukesh tiwari <mukeshtiwari.iiitm at gmail.com> wrote:
>> Also, I'm not sure if the logic in the two versions is the same: I'm
>> not sure about how you handle the boolean aspect in C++, but you have
>> a third for-loop there that doesn't seem to correspond to anything in
>> the Haskell version.
>>
> Which  loop ?

for( int i = 2 ; i <= Lim ; i++) if ( ! prime[i] ) v.push_back( i ) ;

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list