Create an HTML table: Difference between revisions
Content added Content deleted
(Added Wren) |
(Create an HTML table en FreeBASIC) |
||
Line 2,177: | Line 2,177: | ||
</tBody> |
</tBody> |
||
</Table> |
</Table> |
||
=={{header|FreeBASIC}}== |
|||
<lang freebasic>Dim As Integer ncols = 3, nrows = 4 |
|||
Dim As Integer col, row |
|||
Print "<!DOCTYPE html>" & Chr(10) & "<html>" |
|||
Print "<head></head>" & Chr(10) & "<body>" |
|||
Print "<table border = 1 cellpadding = 10 cellspacing =0>" |
|||
For row = 0 To nrows |
|||
If row = 0 Then |
|||
Print "<tr><th></th>" ; |
|||
Else |
|||
Print "<tr><th>" & row & "</th>" ; |
|||
End If |
|||
For col = 1 To ncols |
|||
If row = 0 Then |
|||
Print "<th>" & Chr(87 + col) & "</th>" ; |
|||
Else |
|||
Print "<td align=""right"">" & Rnd(9999) & "</td>" ; |
|||
End If |
|||
Next col |
|||
Print "</tr>" |
|||
Next row |
|||
Print "</table>" |
|||
Print "</body>" & Chr(10) & "</html>" |
|||
Sleep</lang> |
|||
=={{header|Go}}== |
=={{header|Go}}== |