Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
27
Task/Integer-sequence/Oberon-2/integer-sequence.oberon-2
Normal file
27
Task/Integer-sequence/Oberon-2/integer-sequence.oberon-2
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
MODULE IntegerSeq;
|
||||
IMPORT
|
||||
Out,
|
||||
Object:BigInt;
|
||||
|
||||
PROCEDURE IntegerSequence*;
|
||||
VAR
|
||||
i: LONGINT;
|
||||
BEGIN
|
||||
FOR i := 0 TO MAX(LONGINT) DO
|
||||
Out.LongInt(i,0);Out.String(", ")
|
||||
END;
|
||||
Out.Ln
|
||||
END IntegerSequence;
|
||||
|
||||
PROCEDURE BigIntSequence*;
|
||||
VAR
|
||||
i: BigInt.BigInt;
|
||||
BEGIN
|
||||
i := BigInt.zero;
|
||||
LOOP
|
||||
Out.Object(i.ToString() + ", ");
|
||||
i := i.Add(BigInt.one);
|
||||
END
|
||||
END BigIntSequence;
|
||||
|
||||
END IntegerSeq.
|
||||
Loading…
Add table
Add a link
Reference in a new issue