Euler Project Problem 2 Atom Feed 0

# 's
 1       program euler2
2
3 integer current
4 integer last
5 integer nsum
6 integer tmp
7
8 nsum = 0
9 last = 1
10 current = 2
11
12 do while(current < 4.0e6)
13
14 if (mod(current, 2) == 0) then
15 nsum = nsum + current
16 end if
17
18 tmp = last
19 last = current
20 current = last + tmp
21 end do
22
23 print *,nsum
24
25 end program euler2