Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Repeat/Modula-2/repeat.mod2
Normal file
24
Task/Repeat/Modula-2/repeat.mod2
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
MODULE Repeat;
|
||||
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
|
||||
|
||||
TYPE F = PROCEDURE;
|
||||
|
||||
PROCEDURE Repeat(fun : F; c : INTEGER);
|
||||
VAR i : INTEGER;
|
||||
BEGIN
|
||||
FOR i:=1 TO c DO
|
||||
fun
|
||||
END
|
||||
END Repeat;
|
||||
|
||||
PROCEDURE Print;
|
||||
BEGIN
|
||||
WriteString("Hello");
|
||||
WriteLn
|
||||
END Print;
|
||||
|
||||
BEGIN
|
||||
Repeat(Print, 3);
|
||||
|
||||
ReadChar
|
||||
END Repeat.
|
||||
Loading…
Add table
Add a link
Reference in a new issue