Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Create-an-HTML-table/Nim/create-an-html-table.nim
Normal file
14
Task/Create-an-HTML-table/Nim/create-an-html-table.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import random, htmlgen
|
||||
randomize()
|
||||
|
||||
template randTD(): string = td($rand(1000..9999))
|
||||
proc randTR(x: int): string =
|
||||
tr(td($x, style="font-weight: bold"), randTD, randTD, randTD)
|
||||
|
||||
echo table(
|
||||
tr(th"", th"X", th"Y", th"Z"),
|
||||
randTR 1,
|
||||
randTR 2,
|
||||
randTR 3,
|
||||
randTR 4,
|
||||
randTR 5)
|
||||
Loading…
Add table
Add a link
Reference in a new issue