Mark, you're the man! I was doing something so complex that I can't believe myself! That is very elegant, I like the way you replace the sequence, I was keeping them all doing lots of loops.
Thanks for this solution! wonderful! :D Cheers andre On Tue, Feb 23, 2010 at 1:49 PM, Mark Schonewille < [email protected]> wrote: > 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.netwhich >> 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 >> > > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- http://www.andregarzia.com All We Do Is Code. _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
