June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,37 @@
MODULE FloydTriangle;
FROM FormatString IMPORT FormatString;
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
PROCEDURE WriteInt(n : INTEGER);
VAR buf : ARRAY[0..9] OF CHAR;
BEGIN
FormatString("%4i", buf, n);
WriteString(buf)
END WriteInt;
PROCEDURE Print(r : INTEGER);
VAR n,i,limit : INTEGER;
BEGIN
IF r<0 THEN RETURN END;
n := 1;
limit := 1;
WHILE r#0 DO
FOR i:=1 TO limit DO
WriteInt(n);
INC(n)
END;
WriteLn;
DEC(r);
INC(limit)
END
END Print;
BEGIN
Print(5);
WriteLn;
Print(14);
ReadChar
END FloydTriangle.