Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -4,10 +4,11 @@ integer i;
|
|||
boolean another;
|
||||
i := 0;
|
||||
another := true;
|
||||
for i := i + 1 while another do
|
||||
for i := i while another do
|
||||
begin
|
||||
i := i + 1;
|
||||
outinteger(1,i);
|
||||
comment - repeat until i mod 6 = 0;
|
||||
comment - stop once i mod 6 = 0;
|
||||
if i = (i div 6) * 6 then another := false;
|
||||
end;
|
||||
|
||||
|
|
|
|||
14
Task/Loops-Do-while/S-BASIC/loops-do-while.basic
Normal file
14
Task/Loops-Do-while/S-BASIC/loops-do-while.basic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
rem - return n mod m
|
||||
function mod(n, m = integer) = integer
|
||||
end = n - (n / m) * m
|
||||
|
||||
var i = integer
|
||||
i = 0
|
||||
repeat
|
||||
begin
|
||||
i = i + 1
|
||||
print i;
|
||||
end
|
||||
until mod(i, 6) = 0
|
||||
|
||||
end
|
||||
8
Task/Loops-Do-while/Tailspin/loops-do-while-2.tailspin
Normal file
8
Task/Loops-Do-while/Tailspin/loops-do-while-2.tailspin
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
doWhile source
|
||||
0 -> # !
|
||||
otherwise val is $ + 1;
|
||||
$val !
|
||||
$val -> if <|?($ mod 6 matches <~|=0>)> -> # !
|
||||
end doWhile
|
||||
|
||||
$doWhile !
|
||||
Loading…
Add table
Add a link
Reference in a new issue