Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
34
Task/Create-an-HTML-table/C-sharp/create-an-html-table-1.cs
Normal file
34
Task/Create-an-HTML-table/C-sharp/create-an-html-table-1.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace prog
|
||||
{
|
||||
class MainClass
|
||||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
Random rnd = new Random();
|
||||
|
||||
s.AppendLine("<table>");
|
||||
s.AppendLine("<thead align = \"right\">");
|
||||
s.Append("<tr><th></th>");
|
||||
for(int i=0; i<3; i++)
|
||||
s.Append("<td>" + "XYZ"[i] + "</td>");
|
||||
s.AppendLine("</tr>");
|
||||
s.AppendLine("</thead>");
|
||||
s.AppendLine("<tbody align = \"right\">");
|
||||
for( int i=0; i<3; i++ )
|
||||
{
|
||||
s.Append("<tr><td>"+i+"</td>");
|
||||
for( int j=0; j<3; j++ )
|
||||
s.Append("<td>"+rnd.Next(10000)+"</td>");
|
||||
s.AppendLine("</tr>");
|
||||
}
|
||||
s.AppendLine("</tbody>");
|
||||
s.AppendLine("</table>");
|
||||
|
||||
Console.WriteLine( s );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue