RosettaCodeData/Task/Flow-control-structures/REXX/flow-control-structures-6.rexx
2014-01-17 05:34:36 +00:00

18 lines
423 B
Rexx

do j=1 to 10
say 'j=' j
if j>5 then leave
say 'negative j=' (-j)
end /*j*/
say 'end of the DO loop for j.'
ouch=60
sum=0
do k=0 to 100 by 3
say 'k=' k
do m=1 to k
if m=ouch then leave k
sum=sum+m
end /*m*/
end /*k*/
say 'sum=' sum