Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
15
Task/Loops-Do-while/COBOL/loops-do-while.cobol
Normal file
15
Task/Loops-Do-while/COBOL/loops-do-while.cobol
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. loop-do-while.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 i PIC 99 VALUE 0.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
PERFORM WITH TEST AFTER UNTIL FUNCTION MOD(i, 6) = 0
|
||||
ADD 1 TO i
|
||||
DISPLAY i
|
||||
END-PERFORM
|
||||
|
||||
GOBACK
|
||||
.
|
||||
5
Task/Loops-Do-while/Chapel/loops-do-while.chapel
Normal file
5
Task/Loops-Do-while/Chapel/loops-do-while.chapel
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var val = 0;
|
||||
do {
|
||||
val += 1;
|
||||
writeln(val);
|
||||
} while val % 6 > 0;
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
do() ->
|
||||
io:format("0~n"),
|
||||
do(1).
|
||||
do(0).
|
||||
|
||||
do(0) ->
|
||||
io:fwrite( "0 " ),
|
||||
do( 1 );
|
||||
do(N) when N rem 6 =:= 0 ->
|
||||
io:format("~w~n", [N]);
|
||||
do(N) ->
|
||||
io:format("~w~n", [N]),
|
||||
io:fwrite( "~p ", [N] ),
|
||||
do(N+1).
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/*REXX program to demonstrate a DO UNTIL construction. */
|
||||
|
||||
/*REXX program demonstrates a DO UNTIL construction. */
|
||||
v=0
|
||||
do until v//6 == 0
|
||||
do until v//6==0 /*REXX // is the ÷ remainder.*/
|
||||
v=v+1
|
||||
say v
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*REXX program to demonstrate a DO UNTIL construction. */
|
||||
/*REXX program demonstrates a DO UNTIL construction. */
|
||||
|
||||
do v=1 until v//6==0
|
||||
do v=1 until v//6==0 /*REXX // is the ÷ remainder.*/
|
||||
say v
|
||||
end
|
||||
/*stick a fork in it, we're done.*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue