Project Euler

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Feb 23 11:49:31 EST 2010


Andre,

on mouseUp
      put "0,1" into mySequence
      put 0 into mySum
      repeat
           put the last item of mySequence into myCurrentNumber
           if myCurrentNumber < 4E6 then
                if myCurrentNumber mod 2 is 0 then add myCurrentNumber  
to mySum
                put myCurrentNumber & comma & (item 1 of mySequence +  
myCurrentNumber) into mySequence
           else exit repeat
      end repeat
      put mySum
end mouseUp

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

Economy-x-Talk is always looking for new software development  
projects. Feel free to contact me for a quote.

Op 23 feb 2010, om 17:28 heeft Andre Garzia het volgende geschreven:

> Hi There Folks,
>
> I don't know if you guys are familiar with http:// 
> www.projecteuler.net which
> is officially a very fun project according to my own concepts of  
> fun. It is
> a repository of mathematical problems which require more than simple  
> math to
> solve, it usually require some programming. You can go solving your  
> problems
> and getting scores. I just solved the first one in Rev.
>
> "Add all the natural numbers below one thousand that are multiples  
> of 3 or
> 5."
>
> Now, the second one is giving me trouble... rsrsrsrs
>
> "Find the sum of all the even-valued terms in the Fibonacci sequence  
> which
> do not exceed four million."
>
> I think I am going to reach the upper limits of rev math with it.
>
> :D




More information about the use-livecode mailing list