Loops/Continue: Difference between revisions

→‎{{header|Fortran}}: this version show the existence and use of cycle
No edit summary
(→‎{{header|Fortran}}: this version show the existence and use of cycle)
Line 88:
=={{header|Fortran}}==
{{works with|Fortran|90 and later}}
 
DO i = 1, 10
<lang fortran>do i = 1, 10
IF (MOD(i, 5) == 0) THEN
WRITEwrite(*, "'(I0)"', advance='no') i
IFif (MOD mod(i, 5) == 0 ) THENthen
ELSE
write(*,*)
WRITE(*, "(I0,A)", ADVANCE="NO") i, ", "
ENDIF cycle
end if
END DO
write(*, '(A)', advance='no') ', '
end do</lang>
 
=={{header|J}}==