Anonymous user
Loops/For with a specified step: Difference between revisions
→{{header|Fortran}}: added Fortran 77 code
(→{{header|Fortran}}: added Fortran 77 code) |
|||
Line 215:
print *, i
end do</lang>
{{works with|Fortran|77 and later}}
<lang fortran> PROGRAM STEPFOR
INTEGER I
C This will print all even numbers from -10 to +10, inclusive.
DO 10 I = -10, 10, 2
WRITE (*,*) I
10 CONTINUE
STOP
END</lang>
=={{header|F_Sharp|F#}}==
|