Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
9
Task/Integer-sequence/Ada/integer-sequence-1.adb
Normal file
9
Task/Integer-sequence/Ada/integer-sequence-1.adb
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.adb
Normal file
7
Task/Integer-sequence/Ada/integer-sequence-2.adb
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,9 @@
|
|||
import ballerina/io;
|
||||
|
||||
public function main() {
|
||||
int a = 1;
|
||||
while true {
|
||||
io:println(a);
|
||||
a += 1;
|
||||
}
|
||||
}
|
||||
16
Task/Integer-sequence/COBOL/integer-sequence.cob
Normal file
16
Task/Integer-sequence/COBOL/integer-sequence.cob
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
|
||||
.
|
||||
2
Task/Integer-sequence/Emacs-Lisp/integer-sequence.el
Normal file
2
Task/Integer-sequence/Emacs-Lisp/integer-sequence.el
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(dotimes (i most-positive-fixnum)
|
||||
(message "%d" (1+ i)))
|
||||
6
Task/Integer-sequence/Euphoria/integer-sequence.eu
Normal file
6
Task/Integer-sequence/Euphoria/integer-sequence.eu
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
integer i
|
||||
i = 0
|
||||
while 1 do
|
||||
? i
|
||||
i += 1
|
||||
end while
|
||||
11
Task/Integer-sequence/Gleam/integer-sequence.gleam
Normal file
11
Task/Integer-sequence/Gleam/integer-sequence.gleam
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import gleam/int
|
||||
import gleam/io
|
||||
|
||||
pub fn main() {
|
||||
count_forever(from: 1)
|
||||
}
|
||||
|
||||
pub fn count_forever(from n: Int) -> Nil {
|
||||
n |> int.to_string |> io.println
|
||||
count_forever(n + 1)
|
||||
}
|
||||
8
Task/Integer-sequence/PowerShell/integer-sequence.ps1
Normal file
8
Task/Integer-sequence/PowerShell/integer-sequence.ps1
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
try
|
||||
{
|
||||
for ([int]$i = 0;;$i++)
|
||||
{
|
||||
$i
|
||||
}
|
||||
}
|
||||
catch {break}
|
||||
Loading…
Add table
Add a link
Reference in a new issue