Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,7 @@
While 1
rand^20→A
Disp A▶Dec
ReturnIf A=10
rand^20→B
Disp B▶Dec,i
End

View file

@ -0,0 +1,6 @@
LOOP
A=INT(RND(1)*20)
PRINT(A)
IF A=10 THEN EXIT LOOP END IF !EXIT FOR works the same inside FOR loops
PRINT(INT(RND(1)*20))
END LOOP

View file

@ -0,0 +1,16 @@
' FB 1.05.0 Win64
Dim i As Integer
Randomize
Do
i = Int(Rnd * 20)
Print Using "##"; i;
Print " ";
If i = 10 Then Exit Do
i = Int(Rnd * 20)
Print Using "##"; i;
Print" ";
Loop
Print
Sleep

View file

@ -0,0 +1,8 @@
include "ConsoleWindow"
randomize
dim as short stopGo, goOn
while ( stopGo != 10 )
stopGo = rnd(19) : print "stopGo ="; stopGo,
goOn = rnd(19) : print "goOn ="; goOn
wend

View file

@ -0,0 +1,13 @@
PROCEDURE Loop()
LOCAL n
DO WHILE .T.
? n := hb_RandomInt( 0, 19 )
IF n == 10
EXIT
ENDIF
? hb_RandomInt( 0, 19 )
ENDDO
RETURN

View file

@ -0,0 +1,7 @@
local(x = 0)
while(#x != 10) => {^
#x = integer_random(19,0)
#x
#x == 10 ? loop_abort
', '+integer_random(19,0)+'\r'
^}

View file

@ -0,0 +1,6 @@
repeat while TRUE
n = random(20)-1
put n
if n = 10 then exit repeat
put random(20)-1
end repeat

View file

@ -0,0 +1,8 @@
command loopForeverRandom
repeat forever
put random(20) - 1 into tRand
put tRand
if tRand is 10 then exit repeat
put random(20) - 1
end repeat
end loopForeverRandom

View file

@ -0,0 +1,9 @@
import math
while true:
let a = random(20)
echo a
if a == 10:
break
let b = random(20)
echo b

View file

@ -0,0 +1,5 @@
while(true) [
19 rand dup print ":" print
10 == ifTrue: [ break ]
19 rand print " " print
]

View file

@ -0,0 +1,7 @@
integer i
while 1 do
i = rand(20)-1
printf(1, "%g ", {i})
if i=10 then exit end if
printf(1, "%g\n", {rand(20)-1})
end while

View file

@ -0,0 +1,5 @@
while true
a = random(20)
see a + nl
if a = 10 exit ok
end

View file

@ -0,0 +1,6 @@
var lim = 20;
loop {
say (var n = lim.rand.int);
n == 10 && break;
say lim.rand.int;
}

View file

@ -0,0 +1,11 @@
while true
{
let a = Int(arc4random()) % (20)
print("a: \(a)",terminator: " ")
if (a == 10)
{
break
}
let b = Int(arc4random()) % (20)
print("b: \(b)")
}

View file

@ -0,0 +1,11 @@
decl ursa.util.random r
decl int a b
while true
set a (r.getint 19)
out a endl console
if (= a 10)
break
end while
set b (r.getint 19)
out b endl console
end while