License Public Domain
Lines 16
Permissions
Owner: brianoneill
Group Owner: SnortSnort
Viewable by Everyone
Editable by All Siafoo Users
Hide
Don't get spied on – We respect your privacy and provide numerous options to protect it. Join Siafoo Now or Learn More

euler2-fortran Atom Feed 0

# 's
 1      program euler2
2
3 implicit none
4 integer old,older,new,S
5
6
7 older = 1
8 old = 2
9 S = 2
10 new = old + older
11 do while(new.lt.4000000)
12
13 new = old + older
14 if(mod(new,2).eq.0) S=S+new
15
16 older=old
17 old=new
18 print *, new,S
19
20 end do
21
22 stop
23 end program