Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Integer-sequence/00-META.yaml
Normal file
2
Task/Integer-sequence/00-META.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
from: http://rosettacode.org/wiki/Integer_sequence
|
||||
9
Task/Integer-sequence/00-TASK.txt
Normal file
9
Task/Integer-sequence/00-TASK.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
;Task:
|
||||
Create a program that, when run, would display all integers from '''1''' to <big><big> ''' <b> ∞ </b> ''' </big></big> (or any relevant implementation limit), in sequence (i.e. 1, 2, 3, 4, etc) if given enough time.
|
||||
|
||||
|
||||
An example may not be able to reach arbitrarily-large numbers based on implementations limits. For example, if integers are represented as a 32-bit unsigned value with 0 as the smallest representable value, the largest representable value would be 4,294,967,295. Some languages support arbitrarily-large numbers as a built-in feature, while others make use of a module or library.
|
||||
|
||||
If appropriate, provide an example which reflect the language implementation's common built-in limits as well as an example which supports arbitrarily large numbers, and describe the nature of such limitations—or lack thereof.
|
||||
<br><br>
|
||||
|
||||
1
Task/Integer-sequence/0815/integer-sequence.0815
Normal file
1
Task/Integer-sequence/0815/integer-sequence.0815
Normal file
|
|
@ -0,0 +1 @@
|
|||
}:_:<:1:+%<:a:~$^:_:
|
||||
2
Task/Integer-sequence/11l/integer-sequence.11l
Normal file
2
Task/Integer-sequence/11l/integer-sequence.11l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
L(i) 1..
|
||||
print(i)
|
||||
15
Task/Integer-sequence/360-Assembly/integer-sequence.360
Normal file
15
Task/Integer-sequence/360-Assembly/integer-sequence.360
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
* Integer sequence 06/05/2016
|
||||
INTSEQED CSECT
|
||||
USING INTSEQED,12
|
||||
LR 12,15
|
||||
LA 6,1 i=1
|
||||
LOOP CVD 6,DW binary to pack decimal
|
||||
MVC WTOMSG+4(12),EM12 load mask
|
||||
ED WTOMSG+4(12),DW+2 packed dec to char
|
||||
WTO MF=(E,WTOMSG) write to console
|
||||
LA 6,1(6) i=i+1
|
||||
B LOOP goto loop
|
||||
WTOMSG DC 0F,H'80',H'0',CL80' '
|
||||
DW DS 0D,PL8 pack dec 15num
|
||||
EM12 DC X'402020202020202020202120' mask CL12 11num
|
||||
END INTSEQED
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
ORG 0100H
|
||||
MVI A, 0 ; move immediate
|
||||
LOOP: INR A ; increment
|
||||
; call 'PRINT' subroutine, if required
|
||||
JMP LOOP ; jump unconditionally
|
||||
|
||||
END
|
||||
34
Task/Integer-sequence/8080-Assembly/integer-sequence-2.8080
Normal file
34
Task/Integer-sequence/8080-Assembly/integer-sequence-2.8080
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
ORG 0100H
|
||||
BITS EQU 128 ; 128 bits of precision
|
||||
BYTES EQU BITS / 8 ; Number of bytes we store those bits in
|
||||
|
||||
; Zero out the storage for our number
|
||||
LXI H,BUFR ; HL points at BUFR. (HL is idiomatically used for pointers)
|
||||
MVI C,BYTES ; C holds the number of bytes we'll use
|
||||
XRA A ; XOR with A is a 1-byte instruction to set A to zero
|
||||
INIT: MOV M,A ; Store 0 to address pointed to by HL
|
||||
INX H ; Advance HL to the next byte
|
||||
DCR C ; Count down
|
||||
JNZ INIT ; Keep looping if we're not done
|
||||
|
||||
; The "very long integer" is zeroed, so start the loop
|
||||
LOOP: CALL PRBUFR ; Output our number
|
||||
LXI H,BUFR ; HL Points to BUFR
|
||||
MVI C,BYTES ; Count down (assume fewer than 256 bytes in our integer)
|
||||
NEXT: INR M ; Increment the byte pointed to by HL. Sets the zero flag
|
||||
JNZ LOOP ; If the increment didn't overflow A, start the loop over
|
||||
; This byte overflowed, so we need to advance to the next byte in our number
|
||||
INX H ; We store our byes in order of increasing significance
|
||||
DCR C ; Count down to make sure we don't overflow our buffer
|
||||
JNZ NEXT ; jump to process the next, more significant byte
|
||||
|
||||
; If we get here, we have overflowed our integer!
|
||||
HALT ; TODO: probably something other than "halt the CPU"
|
||||
|
||||
PRBUFR: ; TODO, a subroutine that shows all of the digits in BUFR on the console
|
||||
; Assume that this code trashes all our registers...
|
||||
RET
|
||||
|
||||
BUFR: ; This space will hold our number
|
||||
; We zero this memory before the loop
|
||||
END
|
||||
6
Task/Integer-sequence/ALGOL-68/integer-sequence.alg
Normal file
6
Task/Integer-sequence/ALGOL-68/integer-sequence.alg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
main:
|
||||
(
|
||||
FOR i DO
|
||||
printf(($g(0)","$,i))
|
||||
OD
|
||||
)
|
||||
12
Task/Integer-sequence/ALGOL-W/integer-sequence.alg
Normal file
12
Task/Integer-sequence/ALGOL-W/integer-sequence.alg
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
begin
|
||||
% print the integers from 1 onwards %
|
||||
% Algol W only has 32-bit integers. When i reaches 2^32, %
|
||||
% an integer overflow event would be raised which by default, %
|
||||
% should terminate the program %
|
||||
integer i;
|
||||
i := 1;
|
||||
while true do begin
|
||||
write( i );
|
||||
i := i + 1
|
||||
end loop_forever ;
|
||||
end.
|
||||
15
Task/Integer-sequence/ARM-Assembly/integer-sequence.arm
Normal file
15
Task/Integer-sequence/ARM-Assembly/integer-sequence.arm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
.text
|
||||
.global main
|
||||
|
||||
@ An ARM program that keeps incrementing R0 forever
|
||||
@
|
||||
@ If desired, a call to some 'PRINT' routine --
|
||||
@ which would depend on the OS -- could be included
|
||||
|
||||
main:
|
||||
mov r0, #0 @ start with R0 = 0
|
||||
|
||||
repeat:
|
||||
@ call to 'PRINT' routine
|
||||
add r0, r0, #1 @ increment R0
|
||||
b repeat @ unconditional branch
|
||||
4
Task/Integer-sequence/AWK/integer-sequence.awk
Normal file
4
Task/Integer-sequence/AWK/integer-sequence.awk
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
BEGIN {
|
||||
for( i=0; i != i + 1; i++ )
|
||||
print( i )
|
||||
}
|
||||
10
Task/Integer-sequence/Action-/integer-sequence.action
Normal file
10
Task/Integer-sequence/Action-/integer-sequence.action
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
PROC Main()
|
||||
CARD i
|
||||
|
||||
i=0
|
||||
DO
|
||||
PrintF("%U ",i)
|
||||
i==+1
|
||||
UNTIL i=0
|
||||
OD
|
||||
RETURN
|
||||
9
Task/Integer-sequence/Ada/integer-sequence-1.ada
Normal file
9
Task/Integer-sequence/Ada/integer-sequence-1.ada
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
with Ada.Text_IO;
|
||||
procedure Integers is
|
||||
Value : Integer := 1;
|
||||
begin
|
||||
loop
|
||||
Ada.Text_IO.Put_Line (Integer'Image (Value));
|
||||
Value := Value + 1; -- raises exception Constraint_Error on overflow
|
||||
end loop;
|
||||
end Integers;
|
||||
7
Task/Integer-sequence/Ada/integer-sequence-2.ada
Normal file
7
Task/Integer-sequence/Ada/integer-sequence-2.ada
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
with Ada.Text_IO;
|
||||
procedure Positives is
|
||||
begin
|
||||
for Value in Positive'Range loop
|
||||
Ada.Text_IO.Put_Line (Positive'Image (Value));
|
||||
end loop;
|
||||
end Positives;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
10 I% = 1
|
||||
20 PRINT I%;
|
||||
30 I% = I% + 1
|
||||
40 PRINT ", ";
|
||||
50 GOTO 20
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
, 32646, 32647, 32648, 32649, 32650, 326
|
||||
51, 32652, 32653, 32654, 32655, 32656, 3
|
||||
2657, 32658, 32659, 32660, 32661, 32662,
|
||||
32663, 32664, 32665, 32666, 32667, 3266
|
||||
8, 32669, 32670, 32671, 32672, 32673, 32
|
||||
674, 32675, 32676, 32677, 32678, 32679,
|
||||
32680, 32681, 32682, 32683, 32684, 32685
|
||||
, 32686, 32687, 32688, 32689, 32690, 326
|
||||
91, 32692, 32693, 32694, 32695, 32696, 3
|
||||
2697, 32698, 32699, 32700, 32701, 32702,
|
||||
32703, 32704, 32705, 32706, 32707, 3270
|
||||
8, 32709, 32710, 32711, 32712, 32713, 32
|
||||
714, 32715, 32716, 32717, 32718, 32719,
|
||||
32720, 32721, 32722, 32723, 32724, 32725
|
||||
, 32726, 32727, 32728, 32729, 32730, 327
|
||||
31, 32732, 32733, 32734, 32735, 32736, 3
|
||||
2737, 32738, 32739, 32740, 32741, 32742,
|
||||
32743, 32744, 32745, 32746, 32747, 3274
|
||||
8, 32749, 32750, 32751, 32752, 32753, 32
|
||||
754, 32755, 32756, 32757, 32758, 32759,
|
||||
32760, 32761, 32762, 32763, 32764, 32765
|
||||
, 32766, 32767
|
||||
?ILLEGAL QUANTITY ERROR IN 30
|
||||
]
|
||||
11
Task/Integer-sequence/ArnoldC/integer-sequence.arnoldc
Normal file
11
Task/Integer-sequence/ArnoldC/integer-sequence.arnoldc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
IT'S SHOWTIME
|
||||
HEY CHRISTMAS TREE n
|
||||
YOU SET US UP @NO PROBLEMO
|
||||
STICK AROUND @NO PROBLEMO
|
||||
TALK TO THE HAND n
|
||||
GET TO THE CHOPPER n
|
||||
HERE IS MY INVITATION n
|
||||
GET UP @NO PROBLEMO
|
||||
ENOUGH TALK
|
||||
CHILL
|
||||
YOU HAVE BEEN TERMINATED
|
||||
5
Task/Integer-sequence/Arturo/integer-sequence.arturo
Normal file
5
Task/Integer-sequence/Arturo/integer-sequence.arturo
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
i:0
|
||||
while ø [
|
||||
print i
|
||||
inc 'i
|
||||
]
|
||||
3
Task/Integer-sequence/AutoHotkey/integer-sequence.ahk
Normal file
3
Task/Integer-sequence/AutoHotkey/integer-sequence.ahk
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
x=0
|
||||
Loop
|
||||
TrayTip, Count, % ++x
|
||||
7
Task/Integer-sequence/Axe/integer-sequence.axe
Normal file
7
Task/Integer-sequence/Axe/integer-sequence.axe
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
While getKey(0)
|
||||
End
|
||||
0→I
|
||||
Repeat getKey(0)
|
||||
Disp I▶Dec,i
|
||||
I++
|
||||
EndIf I=0
|
||||
4
Task/Integer-sequence/BASIC/integer-sequence-1.basic
Normal file
4
Task/Integer-sequence/BASIC/integer-sequence-1.basic
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
10 LET A = 0
|
||||
20 LET A = A + 1
|
||||
30 PRINT A
|
||||
40 GO TO 20
|
||||
2
Task/Integer-sequence/BASIC/integer-sequence-2.basic
Normal file
2
Task/Integer-sequence/BASIC/integer-sequence-2.basic
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
A = 0
|
||||
DO: A = A + 1: PRINT A: LOOP 1
|
||||
6
Task/Integer-sequence/BASIC256/integer-sequence.basic
Normal file
6
Task/Integer-sequence/BASIC256/integer-sequence.basic
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
i = 1
|
||||
|
||||
do
|
||||
print i
|
||||
i += 1
|
||||
until i = 0
|
||||
5
Task/Integer-sequence/BBC-BASIC/integer-sequence-1.basic
Normal file
5
Task/Integer-sequence/BBC-BASIC/integer-sequence-1.basic
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
*FLOAT 64
|
||||
REPEAT
|
||||
i += 1
|
||||
PRINT TAB(0,0) i;
|
||||
UNTIL FALSE
|
||||
9
Task/Integer-sequence/BBC-BASIC/integer-sequence-2.basic
Normal file
9
Task/Integer-sequence/BBC-BASIC/integer-sequence-2.basic
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
INSTALL @lib$+"HIMELIB"
|
||||
PROC_himeinit("")
|
||||
reg% = 1
|
||||
|
||||
PROC_hiputdec(reg%, "0")
|
||||
REPEAT
|
||||
SYS `hi_Incr`, ^reg%, ^reg%
|
||||
PRINT TAB(0,0) FN_higetdec(reg%);
|
||||
UNTIL FALSE
|
||||
2
Task/Integer-sequence/BQN/integer-sequence.bqn
Normal file
2
Task/Integer-sequence/BQN/integer-sequence.bqn
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
_while_ ← {𝔽⍟𝔾∘𝔽_𝕣_𝔾∘𝔽⍟𝔾𝕩}
|
||||
(1+•Show) _while_ (≤⟜∞) 1
|
||||
6
Task/Integer-sequence/Batch-File/integer-sequence.bat
Normal file
6
Task/Integer-sequence/Batch-File/integer-sequence.bat
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@echo off
|
||||
set number=0
|
||||
:loop
|
||||
set /a number+=1
|
||||
echo %number%
|
||||
goto loop
|
||||
1
Task/Integer-sequence/Bc/integer-sequence.bc
Normal file
1
Task/Integer-sequence/Bc/integer-sequence.bc
Normal file
|
|
@ -0,0 +1 @@
|
|||
while (++i) i
|
||||
2
Task/Integer-sequence/Beeswax/integer-sequence-1.beeswax
Normal file
2
Task/Integer-sequence/Beeswax/integer-sequence-1.beeswax
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
qNP<
|
||||
_1>{d
|
||||
1
Task/Integer-sequence/Beeswax/integer-sequence-2.beeswax
Normal file
1
Task/Integer-sequence/Beeswax/integer-sequence-2.beeswax
Normal file
|
|
@ -0,0 +1 @@
|
|||
_1F6~@{PN@J
|
||||
1
Task/Integer-sequence/Befunge/integer-sequence.bf
Normal file
1
Task/Integer-sequence/Befunge/integer-sequence.bf
Normal file
|
|
@ -0,0 +1 @@
|
|||
1+:0`!#@_:.55+,
|
||||
1
Task/Integer-sequence/Bracmat/integer-sequence.bracmat
Normal file
1
Task/Integer-sequence/Bracmat/integer-sequence.bracmat
Normal file
|
|
@ -0,0 +1 @@
|
|||
0:?n&whl'out$(1+!n:?n)
|
||||
4
Task/Integer-sequence/Brainf---/integer-sequence-1.bf
Normal file
4
Task/Integer-sequence/Brainf---/integer-sequence-1.bf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
++++++++++>>>+[[->>+<[+>->+<<---------------------------------------
|
||||
-------------------[>>-<++++++++++<[+>-<]]>[-<+>]<++++++++++++++++++
|
||||
++++++++++++++++++++++++++++++>]<[<]>>[-<+++++++++++++++++++++++++++
|
||||
++++++++++++++++++++++>]>]>[>>>]<<<[.<<<]<.>>>+]
|
||||
4
Task/Integer-sequence/Brainf---/integer-sequence-2.bf
Normal file
4
Task/Integer-sequence/Brainf---/integer-sequence-2.bf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
++++++++++>>-[>+[->>+<[+>->+<<--------------------------------------
|
||||
--------------------[>>-<++++++++++<[+>-<]]>[-<+>]<+++++++++++++++++
|
||||
+++++++++++++++++++++++++++++++>]<[<]>>[-<++++++++++++++++++++++++++
|
||||
+++++++++++++++++++++++>]>]>[>>>]<<<[.<<<]<.>>-]
|
||||
1
Task/Integer-sequence/Brainf---/integer-sequence-3.bf
Normal file
1
Task/Integer-sequence/Brainf---/integer-sequence-3.bf
Normal file
|
|
@ -0,0 +1 @@
|
|||
+[<<+>>[[<<"-----------"["+++++++++++"<]>]>[<<<<+>>+>>[>>]<]<]>>[>>]<<]
|
||||
6
Task/Integer-sequence/Brat/integer-sequence.brat
Normal file
6
Task/Integer-sequence/Brat/integer-sequence.brat
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
i = 1
|
||||
|
||||
loop {
|
||||
p i
|
||||
i = i + 1
|
||||
}
|
||||
1
Task/Integer-sequence/Burlesque/integer-sequence.blq
Normal file
1
Task/Integer-sequence/Burlesque/integer-sequence.blq
Normal file
|
|
@ -0,0 +1 @@
|
|||
1R@
|
||||
11
Task/Integer-sequence/C++/integer-sequence-1.cpp
Normal file
11
Task/Integer-sequence/C++/integer-sequence-1.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
int main()
|
||||
{
|
||||
auto i = std::uintmax_t{};
|
||||
|
||||
while (i < std::numeric_limits<decltype(i)>::max())
|
||||
std::cout << ++i << '\n';
|
||||
}
|
||||
19
Task/Integer-sequence/C++/integer-sequence-2.cpp
Normal file
19
Task/Integer-sequence/C++/integer-sequence-2.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Using the proposed unbounded integer library
|
||||
|
||||
#include <iostream>
|
||||
#include <seminumeric>
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
auto i = std::experimental::seminumeric::integer{};
|
||||
|
||||
while (true)
|
||||
std::cout << ++i << '\n';
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
14
Task/Integer-sequence/C-sharp/integer-sequence.cs
Normal file
14
Task/Integer-sequence/C-sharp/integer-sequence.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
BigInteger i = 1;
|
||||
while (true)
|
||||
{
|
||||
Console.WriteLine(i++);
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Task/Integer-sequence/C/integer-sequence-1.c
Normal file
9
Task/Integer-sequence/C/integer-sequence-1.c
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned int i = 0;
|
||||
while (++i) printf("%u\n", i);
|
||||
|
||||
return 0;
|
||||
}
|
||||
14
Task/Integer-sequence/C/integer-sequence-2.c
Normal file
14
Task/Integer-sequence/C/integer-sequence-2.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <gmp.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
mpz_t i;
|
||||
mpz_init(i); /* zero now */
|
||||
|
||||
while (1) {
|
||||
mpz_add_ui(i, i, 1); /* i = i + 1 */
|
||||
gmp_printf("%Zd\n", i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
29
Task/Integer-sequence/C/integer-sequence-3.c
Normal file
29
Task/Integer-sequence/C/integer-sequence-3.c
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <openssl/bn.h> /* BN_*() */
|
||||
#include <openssl/err.h> /* ERR_*() */
|
||||
#include <stdio.h> /* fprintf(), puts() */
|
||||
|
||||
void
|
||||
fail(const char *message)
|
||||
{
|
||||
fprintf(stderr, "%s: error 0x%08lx\n", ERR_get_error());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
BIGNUM i;
|
||||
char *s;
|
||||
|
||||
BN_init(&i);
|
||||
for (;;) {
|
||||
if (BN_add_word(&i, 1) == 0)
|
||||
fail("BN_add_word");
|
||||
s = BN_bn2dec(&i);
|
||||
if (s == NULL)
|
||||
fail("BN_bn2dec");
|
||||
puts(s);
|
||||
OPENSSL_free(s);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
18
Task/Integer-sequence/CLU/integer-sequence.clu
Normal file
18
Task/Integer-sequence/CLU/integer-sequence.clu
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
% This iterator will generate all integers until the built-in type
|
||||
% overflows. It is a signed machine-sized integer; so 64 bits on
|
||||
% a modern machine. After that it will raise an exception.
|
||||
to_infinity_and_beyond = iter () yields (int)
|
||||
i: int := 0
|
||||
while true do
|
||||
i := i + 1
|
||||
yield(i)
|
||||
end
|
||||
end to_infinity_and_beyond
|
||||
|
||||
start_up = proc ()
|
||||
po: stream := stream$primary_output()
|
||||
|
||||
for i: int in to_infinity_and_beyond() do
|
||||
stream$putl(po, int$unparse(i))
|
||||
end
|
||||
end start_up
|
||||
16
Task/Integer-sequence/COBOL/integer-sequence.cobol
Normal file
16
Task/Integer-sequence/COBOL/integer-sequence.cobol
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Int-Sequence.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
* *> 36 digits is the largest size a numeric field can have.
|
||||
01 I PIC 9(36).
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
* *> Display numbers until I overflows.
|
||||
PERFORM VARYING I FROM 1 BY 1 UNTIL I = 0
|
||||
DISPLAY I
|
||||
END-PERFORM
|
||||
|
||||
GOBACK
|
||||
.
|
||||
4
Task/Integer-sequence/ChucK/integer-sequence.chuck
Normal file
4
Task/Integer-sequence/ChucK/integer-sequence.chuck
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
for(1 => int i; i < Math.INT_MAX; i ++)
|
||||
{
|
||||
<<< i >>>;
|
||||
}
|
||||
5
Task/Integer-sequence/Clean/integer-sequence.clean
Normal file
5
Task/Integer-sequence/Clean/integer-sequence.clean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
module IntegerSequence
|
||||
|
||||
import StdEnv
|
||||
|
||||
Start = [x \\ x <- [1..]]
|
||||
1
Task/Integer-sequence/Clojure/integer-sequence.clj
Normal file
1
Task/Integer-sequence/Clojure/integer-sequence.clj
Normal file
|
|
@ -0,0 +1 @@
|
|||
(map println (next (range)))
|
||||
35
Task/Integer-sequence/CoffeeScript/integer-sequence-1.coffee
Normal file
35
Task/Integer-sequence/CoffeeScript/integer-sequence-1.coffee
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# This very limited BCD-based collection of functions
|
||||
# makes it easy to count very large numbers. All arrays
|
||||
# start off with the ones columns in position zero.
|
||||
# Using arrays of decimal-based digits to model integers
|
||||
# doesn't make much sense for most tasks, but if you
|
||||
# want to keep counting forever, this does the trick.
|
||||
|
||||
BcdInteger =
|
||||
from_string: (s) ->
|
||||
arr = []
|
||||
for c in s
|
||||
arr.unshift parseInt(c)
|
||||
arr
|
||||
|
||||
render: (arr) ->
|
||||
s = ''
|
||||
for elem in arr
|
||||
s = elem.toString() + s
|
||||
s
|
||||
|
||||
succ: (arr) ->
|
||||
arr = (elem for elem in arr)
|
||||
i = 0
|
||||
while arr[i] == 9
|
||||
arr[i] = 0
|
||||
i += 1
|
||||
arr[i] ||= 0
|
||||
arr[i] += 1
|
||||
arr
|
||||
|
||||
# To start counting from 1, change the next line!
|
||||
big_int = BcdInteger.from_string "199999999999999999999999999999999999999999999999999999"
|
||||
while true
|
||||
console.log BcdInteger.render big_int
|
||||
big_int = BcdInteger.succ big_int
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
> coffee foo.coffee | head -5
|
||||
199999999999999999999999999999999999999999999999999999
|
||||
200000000000000000000000000000000000000000000000000000
|
||||
200000000000000000000000000000000000000000000000000001
|
||||
200000000000000000000000000000000000000000000000000002
|
||||
200000000000000000000000000000000000000000000000000003
|
||||
|
|
@ -0,0 +1 @@
|
|||
(loop for i from 1 do (print i))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
(defun pp (x) (pp (1+ (print x))))
|
||||
(funcall (compile 'pp) 1) ; it's less likely interpreted mode will eliminate tails
|
||||
14
Task/Integer-sequence/Component-Pascal/integer-sequence.pas
Normal file
14
Task/Integer-sequence/Component-Pascal/integer-sequence.pas
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
MODULE IntegerSequence;
|
||||
IMPORT StdLog;
|
||||
|
||||
PROCEDURE Do*;
|
||||
VAR
|
||||
i: INTEGER;
|
||||
BEGIN
|
||||
FOR i := 0 TO MAX(INTEGER) DO;
|
||||
StdLog.Int(i)
|
||||
END;
|
||||
StdLog.Ln
|
||||
END Do;
|
||||
|
||||
END IntegerSequence.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
start: ADD one
|
||||
JMP start
|
||||
one: 1
|
||||
8
Task/Integer-sequence/Cowgol/integer-sequence-1.cowgol
Normal file
8
Task/Integer-sequence/Cowgol/integer-sequence-1.cowgol
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
include "cowgol.coh";
|
||||
|
||||
var n: uint32 := 1;
|
||||
while n != 0 loop;
|
||||
print_i32(n);
|
||||
print_nl();
|
||||
n := n + 1;
|
||||
end loop;
|
||||
45
Task/Integer-sequence/Cowgol/integer-sequence-2.cowgol
Normal file
45
Task/Integer-sequence/Cowgol/integer-sequence-2.cowgol
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
include "cowgol.coh";
|
||||
|
||||
sub print_back(s: [uint8]) is
|
||||
while [s] != 0 loop;
|
||||
print_char([s]);
|
||||
s := @prev s;
|
||||
end loop;
|
||||
print_nl();
|
||||
end sub;
|
||||
|
||||
sub incr(n: [uint8]): (r: [uint8]) is
|
||||
r := n;
|
||||
while [n] != 0 loop;
|
||||
n := @prev n;
|
||||
end loop;
|
||||
n := @next n;
|
||||
loop
|
||||
if [n] == 0 then
|
||||
[n] := '1';
|
||||
[@next n] := 0;
|
||||
r := n;
|
||||
break;
|
||||
elseif [n] == '9' then
|
||||
[n] := '0';
|
||||
n := @next n;
|
||||
continue;
|
||||
else
|
||||
[n] := [n] + 1;
|
||||
break;
|
||||
end if;
|
||||
end loop;
|
||||
end sub;
|
||||
|
||||
sub init(n: [uint8]): (r: [uint8]) is
|
||||
[n] := 0;
|
||||
[n+1] := '0';
|
||||
[n+2] := 0;
|
||||
r := n+1;
|
||||
end sub;
|
||||
|
||||
var infnum := init(LOMEM);
|
||||
loop
|
||||
infnum := incr(infnum);
|
||||
print_back(infnum);
|
||||
end loop;
|
||||
3
Task/Integer-sequence/Crystal/integer-sequence.crystal
Normal file
3
Task/Integer-sequence/Crystal/integer-sequence.crystal
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require "big"
|
||||
|
||||
(1.to_big_i ..).each { |i| puts i }
|
||||
7
Task/Integer-sequence/D/integer-sequence-1.d
Normal file
7
Task/Integer-sequence/D/integer-sequence-1.d
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import std.stdio, std.bigint;
|
||||
|
||||
void main() {
|
||||
BigInt i;
|
||||
while (true)
|
||||
writeln(++i);
|
||||
}
|
||||
36
Task/Integer-sequence/D/integer-sequence-2.d
Normal file
36
Task/Integer-sequence/D/integer-sequence-2.d
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import std.stdio, std.traits, std.bigint, std.string;
|
||||
|
||||
void integerSequence(T)() if (isIntegral!T || is(T == BigInt)) {
|
||||
T now = 1;
|
||||
T max = 0;
|
||||
static if (!is(T == BigInt))
|
||||
max = T.max;
|
||||
|
||||
do
|
||||
write(now, " ");
|
||||
while (now++ != max);
|
||||
|
||||
writeln("\nDone!");
|
||||
}
|
||||
|
||||
void main() {
|
||||
writeln("How much time do you have?");
|
||||
writeln(" 0. I'm in hurry.");
|
||||
writeln(" 1. I've some time.");
|
||||
writeln(" 2. I'm on vacation.");
|
||||
writeln(" 3. I'm unemployed...");
|
||||
writeln(" 4. I'm immortal!");
|
||||
write("Enter 0-4 or nothing to quit: ");
|
||||
|
||||
string answer;
|
||||
readf("%s\n", &answer);
|
||||
|
||||
switch (answer.toLower()) {
|
||||
case "0": integerSequence!ubyte(); break;
|
||||
case "1": integerSequence!short(); break;
|
||||
case "2": integerSequence!uint(); break;
|
||||
case "3": integerSequence!long(); break;
|
||||
case "4": integerSequence!BigInt(); break;
|
||||
default: writeln("\nBye bye!"); break;
|
||||
}
|
||||
}
|
||||
5
Task/Integer-sequence/DCL/integer-sequence.dcl
Normal file
5
Task/Integer-sequence/DCL/integer-sequence.dcl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$ i = 1
|
||||
$ loop:
|
||||
$ write sys$output i
|
||||
$ i = i + 1
|
||||
$ goto loop
|
||||
4
Task/Integer-sequence/DWScript/integer-sequence.dw
Normal file
4
Task/Integer-sequence/DWScript/integer-sequence.dw
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var i: Integer;
|
||||
|
||||
for i:=1 to High(i) do
|
||||
PrintLn(i);
|
||||
1
Task/Integer-sequence/Dc/integer-sequence.dc
Normal file
1
Task/Integer-sequence/Dc/integer-sequence.dc
Normal file
|
|
@ -0,0 +1 @@
|
|||
1[p1+lpx]dspx
|
||||
10
Task/Integer-sequence/Delphi/integer-sequence.delphi
Normal file
10
Task/Integer-sequence/Delphi/integer-sequence.delphi
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
program IntegerSequence;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := 1 to High(i) do
|
||||
WriteLn(i);
|
||||
end.
|
||||
5
Task/Integer-sequence/Dyalect/integer-sequence.dyalect
Normal file
5
Task/Integer-sequence/Dyalect/integer-sequence.dyalect
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var n = 0
|
||||
while true {
|
||||
n += 1
|
||||
print(n)
|
||||
}
|
||||
1
Task/Integer-sequence/E/integer-sequence.e
Normal file
1
Task/Integer-sequence/E/integer-sequence.e
Normal file
|
|
@ -0,0 +1 @@
|
|||
for i in int > 0 { println(i) }
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[ Integer sequence
|
||||
================
|
||||
|
||||
A program for the EDSAC
|
||||
|
||||
Displays integers 1,2,3...
|
||||
in binary form in the first
|
||||
word of storage tank 2
|
||||
until stopped
|
||||
|
||||
Works with Initial Orders 2 ]
|
||||
|
||||
T56K [ set load point ]
|
||||
GK [ set base address ]
|
||||
|
||||
A3@ [ increment accumulator ]
|
||||
U64F [ copy accumulator to 64 ]
|
||||
E@ [ jump to base address ]
|
||||
|
||||
P0D [ constant: 1 ]
|
||||
|
||||
EZPF [ begin at load point ]
|
||||
7
Task/Integer-sequence/ERRE/integer-sequence.erre
Normal file
7
Task/Integer-sequence/ERRE/integer-sequence.erre
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.............
|
||||
A%=0
|
||||
LOOP
|
||||
A%=A%+1
|
||||
PRINT(A%;)
|
||||
END LOOP
|
||||
.............
|
||||
10
Task/Integer-sequence/EasyLang/integer-sequence.easy
Normal file
10
Task/Integer-sequence/EasyLang/integer-sequence.easy
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
max = pow 2 53
|
||||
repeat
|
||||
print i
|
||||
if i = 10
|
||||
print ".\n."
|
||||
i = max - 10
|
||||
.
|
||||
until i = max
|
||||
i += 1
|
||||
.
|
||||
2
Task/Integer-sequence/EchoLisp/integer-sequence.l
Normal file
2
Task/Integer-sequence/EchoLisp/integer-sequence.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(lib 'bigint) ;; arbitrary length integers
|
||||
(for ((n (in-naturals))) (writeln n))
|
||||
22
Task/Integer-sequence/Eiffel/integer-sequence.e
Normal file
22
Task/Integer-sequence/Eiffel/integer-sequence.e
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
class
|
||||
APPLICATION
|
||||
inherit
|
||||
ARGUMENTS
|
||||
create
|
||||
make
|
||||
feature {NONE} -- Initialization
|
||||
make
|
||||
-- Run application.
|
||||
do
|
||||
from
|
||||
number := 0
|
||||
until
|
||||
number = number.max_value
|
||||
loop
|
||||
print(number)
|
||||
print(", ")
|
||||
number := number + 1
|
||||
end
|
||||
end
|
||||
number:INTEGER_64
|
||||
end
|
||||
12
Task/Integer-sequence/Elena/integer-sequence.elena
Normal file
12
Task/Integer-sequence/Elena/integer-sequence.elena
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import extensions;
|
||||
|
||||
public program()
|
||||
{
|
||||
var i := 0u;
|
||||
while (true)
|
||||
{
|
||||
console.printLine(i);
|
||||
|
||||
i += 1u
|
||||
}
|
||||
}
|
||||
1
Task/Integer-sequence/Elixir/integer-sequence.elixir
Normal file
1
Task/Integer-sequence/Elixir/integer-sequence.elixir
Normal file
|
|
@ -0,0 +1 @@
|
|||
Stream.iterate(1, &(&1+1)) |> Enum.each(&(IO.puts &1))
|
||||
2
Task/Integer-sequence/Emacs-Lisp/integer-sequence.l
Normal file
2
Task/Integer-sequence/Emacs-Lisp/integer-sequence.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(dotimes (i most-positive-fixnum)
|
||||
(message "%d" (1+ i)))
|
||||
1
Task/Integer-sequence/Erlang/integer-sequence.erl
Normal file
1
Task/Integer-sequence/Erlang/integer-sequence.erl
Normal file
|
|
@ -0,0 +1 @@
|
|||
F = fun(FF, I) -> io:format("~p~n", [I]), FF(FF, I + 1) end, F(F,0).
|
||||
6
Task/Integer-sequence/Euphoria/integer-sequence.euphoria
Normal file
6
Task/Integer-sequence/Euphoria/integer-sequence.euphoria
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
integer i
|
||||
i = 0
|
||||
while 1 do
|
||||
? i
|
||||
i += 1
|
||||
end while
|
||||
6
Task/Integer-sequence/F-Sharp/integer-sequence-1.fs
Normal file
6
Task/Integer-sequence/F-Sharp/integer-sequence-1.fs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// lazy sequence of integers starting with i
|
||||
let rec integers i =
|
||||
seq { yield i
|
||||
yield! integers (i+1) }
|
||||
|
||||
Seq.iter (printfn "%d") (integers 1)
|
||||
1
Task/Integer-sequence/F-Sharp/integer-sequence-2.fs
Normal file
1
Task/Integer-sequence/F-Sharp/integer-sequence-2.fs
Normal file
|
|
@ -0,0 +1 @@
|
|||
let integers = Seq.initInfinite id
|
||||
1
Task/Integer-sequence/F-Sharp/integer-sequence-3.fs
Normal file
1
Task/Integer-sequence/F-Sharp/integer-sequence-3.fs
Normal file
|
|
@ -0,0 +1 @@
|
|||
let integers n = Seq.initInfinite ((+) n)
|
||||
2
Task/Integer-sequence/F-Sharp/integer-sequence-4.fs
Normal file
2
Task/Integer-sequence/F-Sharp/integer-sequence-4.fs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let inline numbers n =
|
||||
Seq.unfold (fun n -> Some (n, n + LanguagePrimitives.GenericOne)) n
|
||||
2
Task/Integer-sequence/Factor/integer-sequence.factor
Normal file
2
Task/Integer-sequence/Factor/integer-sequence.factor
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
USE: lists.lazy
|
||||
1 lfrom [ . ] leach
|
||||
12
Task/Integer-sequence/Fantom/integer-sequence.fantom
Normal file
12
Task/Integer-sequence/Fantom/integer-sequence.fantom
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class Main
|
||||
{
|
||||
public static Void main()
|
||||
{
|
||||
i := 1
|
||||
while (true)
|
||||
{
|
||||
echo (i)
|
||||
i += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Task/Integer-sequence/Fermat/integer-sequence.fermat
Normal file
2
Task/Integer-sequence/Fermat/integer-sequence.fermat
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
n:=0;
|
||||
while 1 do !n;!' '; n:=n+1 od
|
||||
2
Task/Integer-sequence/Fish/integer-sequence.fish
Normal file
2
Task/Integer-sequence/Fish/integer-sequence.fish
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
0>:n1+v
|
||||
^o" "<
|
||||
2
Task/Integer-sequence/Forth/integer-sequence.fth
Normal file
2
Task/Integer-sequence/Forth/integer-sequence.fth
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
: ints ( -- )
|
||||
0 begin 1+ dup cr u. dup -1 = until drop ;
|
||||
13
Task/Integer-sequence/Fortran/integer-sequence.f
Normal file
13
Task/Integer-sequence/Fortran/integer-sequence.f
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
program Intseq
|
||||
implicit none
|
||||
|
||||
integer, parameter :: i64 = selected_int_kind(18)
|
||||
integer(i64) :: n = 1
|
||||
|
||||
! n is declared as a 64 bit signed integer so the program will display up to
|
||||
! 9223372036854775807 before overflowing to -9223372036854775808
|
||||
do
|
||||
print*, n
|
||||
n = n + 1
|
||||
end do
|
||||
end program
|
||||
14
Task/Integer-sequence/FreeBASIC/integer-sequence.basic
Normal file
14
Task/Integer-sequence/FreeBASIC/integer-sequence.basic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
' FB does not natively support arbitrarily large integers though support can be added
|
||||
' by using an external library such as GMP. For now we will just use an unsigned integer (32bit).
|
||||
|
||||
Print "Press Ctrl + C to stop the program at any time"
|
||||
Dim i As UInteger = 1
|
||||
|
||||
Do
|
||||
Print i
|
||||
i += 1
|
||||
Loop Until i = 0 ' will wrap back to 0 when it reaches 4,294,967,296
|
||||
|
||||
Sleep
|
||||
6
Task/Integer-sequence/Frink/integer-sequence.frink
Normal file
6
Task/Integer-sequence/Frink/integer-sequence.frink
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
i=0
|
||||
while true
|
||||
{
|
||||
println[i]
|
||||
i = i + 1
|
||||
}
|
||||
1
Task/Integer-sequence/FunL/integer-sequence.funl
Normal file
1
Task/Integer-sequence/FunL/integer-sequence.funl
Normal file
|
|
@ -0,0 +1 @@
|
|||
for i <- 1.. do println( i )
|
||||
1
Task/Integer-sequence/Futhark/integer-sequence.futhark
Normal file
1
Task/Integer-sequence/Futhark/integer-sequence.futhark
Normal file
|
|
@ -0,0 +1 @@
|
|||
fun main(n: int): [n]int = iota n
|
||||
12
Task/Integer-sequence/FutureBasic/integer-sequence.basic
Normal file
12
Task/Integer-sequence/FutureBasic/integer-sequence.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
UInt64 i = 1
|
||||
|
||||
while ( i < ULLONG_MAX )
|
||||
NSLog( @"%llu\n", i )
|
||||
i++
|
||||
wend
|
||||
|
||||
// NSLog( @"Maximum Unsigned long long: %llu", ULLONG_MAX )
|
||||
|
||||
HandleEvents
|
||||
11
Task/Integer-sequence/GAP/integer-sequence.gap
Normal file
11
Task/Integer-sequence/GAP/integer-sequence.gap
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
InfiniteLoop := function()
|
||||
local n;
|
||||
n := 1;
|
||||
while true do
|
||||
Display(n);
|
||||
n := n + 1;
|
||||
od;
|
||||
end;
|
||||
|
||||
# Prepare some coffee
|
||||
InfiniteLoop();
|
||||
6
Task/Integer-sequence/GUISS/integer-sequence.guiss
Normal file
6
Task/Integer-sequence/GUISS/integer-sequence.guiss
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Start,Programs,Accessories,Calculator,
|
||||
Button:[plus],Button:1,Button:[equals],Button:[plus],Button:1,Button:[equals],
|
||||
Button:[plus],Button:1,Button:[equals],Button:[plus],Button:1,Button:[equals],
|
||||
Button:[plus],Button:1,Button:[equals],Button:[plus],Button:1,Button:[equals],
|
||||
Button:[plus],Button:1,Button:[equals],Button:[plus],Button:1,Button:[equals],
|
||||
Button:[plus],Button:1,Button:[equals],Button:[plus],Button:1,Button:[equals]
|
||||
4
Task/Integer-sequence/GW-BASIC/integer-sequence.basic
Normal file
4
Task/Integer-sequence/GW-BASIC/integer-sequence.basic
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
10 A#=1
|
||||
20 PRINT A#
|
||||
30 A#=A#+1
|
||||
40 GOTO 20
|
||||
9
Task/Integer-sequence/Go/integer-sequence-1.go
Normal file
9
Task/Integer-sequence/Go/integer-sequence-1.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
for i := 1;; i++ {
|
||||
fmt.Println(i)
|
||||
}
|
||||
}
|
||||
13
Task/Integer-sequence/Go/integer-sequence-2.go
Normal file
13
Task/Integer-sequence/Go/integer-sequence-2.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"big"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
one := big.NewInt(1)
|
||||
for i := big.NewInt(1);; i.Add(i, one) {
|
||||
fmt.Println(i)
|
||||
}
|
||||
}
|
||||
8
Task/Integer-sequence/Groovy/integer-sequence.groovy
Normal file
8
Task/Integer-sequence/Groovy/integer-sequence.groovy
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// 32-bit 2's-complement signed integer (int/Integer)
|
||||
for (def i = 1; i > 0; i++) { println i }
|
||||
|
||||
// 64-bit 2's-complement signed integer (long/Long)
|
||||
for (def i = 1L; i > 0; i+=1L) { println i }
|
||||
|
||||
// Arbitrarily-long binary signed integer (BigInteger)
|
||||
for (def i = 1g; ; i+=1g) { println i }
|
||||
1
Task/Integer-sequence/Haskell/integer-sequence-1.hs
Normal file
1
Task/Integer-sequence/Haskell/integer-sequence-1.hs
Normal file
|
|
@ -0,0 +1 @@
|
|||
mapM_ print [1..]
|
||||
1
Task/Integer-sequence/Haskell/integer-sequence-2.hs
Normal file
1
Task/Integer-sequence/Haskell/integer-sequence-2.hs
Normal file
|
|
@ -0,0 +1 @@
|
|||
putStr $ unlines $ map show [1..]
|
||||
2
Task/Integer-sequence/HolyC/integer-sequence.holyc
Normal file
2
Task/Integer-sequence/HolyC/integer-sequence.holyc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
U64 i = 0;
|
||||
while (++i) Print("%d\n", i);
|
||||
3
Task/Integer-sequence/IS-BASIC/integer-sequence.basic
Normal file
3
Task/Integer-sequence/IS-BASIC/integer-sequence.basic
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
100 FOR I=1 TO INF
|
||||
110 PRINT I;
|
||||
120 NEXT
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue