Date created: Sunday, July 10, 2011 7:05:48 PM. Last modified: Thursday, December 13, 2012 11:41:20 AM
#!/bin/bash# Project Euler - Problem 2last=0this=1total=0while (($this<4000000))do f=`expr $this + $last` if [ `expr $f % 2` == 0 ] then total=`expr $total + $f` fi last=$this this=$fdoneecho $total
^ Top
Previous page: Problem 1 Next page: Problem 3