Loops/Continue: Difference between revisions

Content added Content deleted
No edit summary
(→‎{{header|Fortran}}: this version show the existence and use of cycle)
Line 88: Line 88:
=={{header|Fortran}}==
=={{header|Fortran}}==
{{works with|Fortran|90 and later}}
{{works with|Fortran|90 and later}}

DO i = 1, 10
<lang fortran>do i = 1, 10
IF (MOD(i, 5) == 0) THEN
WRITE(*, "(I0)") i
write(*, '(I0)', advance='no') i
if ( mod(i, 5) == 0 ) then
ELSE
write(*,*)
WRITE(*, "(I0,A)", ADVANCE="NO") i, ", "
ENDIF
cycle
end if
END DO
write(*, '(A)', advance='no') ', '
end do</lang>


=={{header|J}}==
=={{header|J}}==