Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,6 +0,0 @@
|
|||
for I in 1..5 loop
|
||||
for J in 1..I loop
|
||||
Put("*");
|
||||
end loop;
|
||||
New_Line;
|
||||
end loop;
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Display-Triangle.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 Outer-Counter PIC 9.
|
||||
01 Inner-Counter PIC 9.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
PERFORM VARYING Outer-Counter FROM 1 BY 1 UNTIL 5 < Outer-Counter
|
||||
|
||||
PERFORM VARYING Inner-Counter FROM 1 BY 1
|
||||
UNTIL Outer-Counter < Inner-Counter
|
||||
DISPLAY "*" NO ADVANCING
|
||||
END-PERFORM
|
||||
|
||||
DISPLAY "" *> Output a newline
|
||||
END-PERFORM
|
||||
|
||||
GOBACK
|
||||
.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
for i in 1..5 {
|
||||
for 1..i do write('*');
|
||||
writeln();
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
Section FOR.
|
||||
Variable T : Type.
|
||||
Variable body : nat -> T -> T.
|
||||
Variable start : nat.
|
||||
|
||||
Fixpoint for_loop n : T -> T :=
|
||||
match n with
|
||||
| O => fun s => s
|
||||
| S n' => fun s => for_loop n' (body (start + n') s)
|
||||
end.
|
||||
|
||||
End FOR.
|
||||
|
||||
Eval vm_compute in
|
||||
for_loop _
|
||||
(fun i =>
|
||||
cons
|
||||
(for_loop _
|
||||
(fun j => cons tt)
|
||||
0 (S i) nil
|
||||
)
|
||||
)
|
||||
0 5 nil.
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import extensions;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
for(int i := 0; i < 5; i += 1)
|
||||
{
|
||||
for(int j := 0; j <= i; j += 1)
|
||||
{ console.write("*") };
|
||||
{ Console.write("*") };
|
||||
|
||||
console.writeLine()
|
||||
Console.writeLine()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
;; Lisp implementation of c-for is like:
|
||||
;; (let ((i nil))
|
||||
;; (while (progn (setq i (if (not i) 0 (1+ i) )) ;; if value of i is nil, initialize its value to 0, if else, add 1
|
||||
;; (< i 10)) ;; end loop when i > 10
|
||||
;; (... body ...) ) ) ;; loop body
|
||||
|
||||
(let ((i nil) (str ""))
|
||||
(while (progn (setq i (if (not i) 0 (1+ i) ))
|
||||
(< i 5))
|
||||
(setq str (concat str "*"))
|
||||
(message str) ) )
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
for i = 1 to 5 do
|
||||
for j = 1 to i do
|
||||
puts(1, "*") -- Same as "puts(1, {'*'})"
|
||||
end for
|
||||
puts(1, "\n") -- Same as "puts(1, {'\n'})"
|
||||
end for
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
for (i in 1...6) {
|
||||
for(j in 0...i) {
|
||||
Sys.print('*');
|
||||
}
|
||||
Sys.println('');
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ VAR
|
|||
BEGIN
|
||||
FOR i := 1 TO 5 DO
|
||||
FOR j := 1 TO i DO
|
||||
Out.Char('*');
|
||||
Out.Char("*");
|
||||
END;
|
||||
Out.Ln
|
||||
END
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
for ($i = 1; $i -le 5; $i++) {
|
||||
for ($j = 1; $j -le $i; $j++) {
|
||||
Write-Host -NoNewline *
|
||||
}
|
||||
Write-Host
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
1..5 | ForEach-Object {
|
||||
1..$_ | ForEach-Object {
|
||||
Write-Host -NoNewline *
|
||||
}
|
||||
Write-Host
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
; Use 'repeat' when an index required, 'loop' when repetition suffices:
|
||||
|
||||
repeat i 5 [
|
||||
loop i [prin "*"]
|
||||
print ""
|
||||
]
|
||||
|
||||
; or a more traditional for loop:
|
||||
|
||||
for i 1 5 1 [
|
||||
loop i [prin "*"]
|
||||
print ""
|
||||
]
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
let s = ref("")
|
||||
for i in 1 to 5 {
|
||||
for _ in 1 to i {
|
||||
s := Js.String2.concat(s.contents, "*")
|
||||
}
|
||||
s := Js.String2.concat(s.contents, "\n")
|
||||
}
|
||||
Js.log(s.contents)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
Option Explicit
|
||||
Dim i, j, s
|
||||
For i = 1 To 5
|
||||
s = ""
|
||||
For j = 1 To i
|
||||
s = s + "*"
|
||||
Next
|
||||
WScript.Echo s
|
||||
Next
|
||||
Loading…
Add table
Add a link
Reference in a new issue