Loops/Do-while: Difference between revisions

m
(Add lang example)
Line 2,031:
x=0
\\ Do or Repeat
Do
x++
print x,
when x mod 6>0
print
// or we can use Until x mod 6 = 0
// and we can use block if we like it
x=0
Do {
x++
Printprint x,
} Untilwhen x mod 6=>0
print
x=0
{
Line 2,042 ⟶ 2,050:
if x mod 6<>0 Then loop ' set loop flag of current block to true
\\ when block end check Loop flag and if true execute block again
Printprint Xx,
}
print
}
Checkit
Line 2,050 ⟶ 2,059:
{{out}}
<pre>
1 2 3 4 5 6
1
1 2 3 4 5 6
2
1 2 3 4 5 6
3
4
5
6
1
2
3
4
5
6
</pre>
 
404

edits