Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
LOCAL i As Integer, n As Integer, lcOut As String
|
||||
CLOSE DATABASES ALL
|
||||
CLEAR
|
||||
CREATE CURSOR nums (num I)
|
||||
INDEX ON num TAG num COLLATE "Machine"
|
||||
SET ORDER TO 0
|
||||
n = 50
|
||||
RAND(-1)
|
||||
FOR i = 1 TO n
|
||||
INSERT INTO nums VALUES (RanInt(1, 10))
|
||||
ENDFOR
|
||||
SELECT num, COUNT(num) As cnt FROM nums ;
|
||||
GROUP BY num INTO CURSOR grouped
|
||||
LIST OFF TO FILE grouped.txt NOCONSOLE
|
||||
lcOut = ""
|
||||
SCAN
|
||||
lcOut = lcOut + TRANSFORM(num) + ","
|
||||
ENDSCAN
|
||||
lcOut = LEFT(lcOut, LEN(lcOut)-1)
|
||||
? lcOut
|
||||
|
||||
FUNCTION RanInt(tnLow As Integer, tnHigh As Integer) As Integer
|
||||
RETURN INT((tnHigh - tnLow + 1)*RAND() + tnLow)
|
||||
ENDFUNC
|
||||
Loading…
Add table
Add a link
Reference in a new issue