Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Create-an-HTML-table/11l/create-an-html-table.11l
Normal file
15
Task/Create-an-HTML-table/11l/create-an-html-table.11l
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
UInt32 seed = 0
|
||||
F nonrandom(n)
|
||||
:seed = 1664525 * :seed + 1013904223
|
||||
R Int(:seed >> 16) % n
|
||||
|
||||
F rand9999()
|
||||
R nonrandom(9000) + 1000
|
||||
|
||||
F tag(tag, txt, attr = ‘’)
|
||||
R ‘<’tag‘’attr‘>’txt‘</’tag‘>’
|
||||
|
||||
V header = tag(‘tr’, ‘,X,Y,Z’.split(‘,’).map(txt -> tag(‘th’, txt)).join(‘’))"\n"
|
||||
V rows = (1..5).map(i -> tag(‘tr’, tag(‘td’, i, ‘ style="font-weight: bold;"’)‘’(0.<3).map(j -> tag(‘td’, rand9999())).join(‘’))).join("\n")
|
||||
V table = tag(‘table’, "\n"header‘’rows"\n")
|
||||
print(table)
|
||||
Loading…
Add table
Add a link
Reference in a new issue