[分享] ASP.NET(C#)输出 99 乘法表
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= i; j++)
{
int k = i * j;
if (i == j)
{
Response.Write(" " + i + " * " + j + " = " + k + "<br/>");
}
else
{
Response.Write(" " + i + " * " + j + " = " + k);
}
}
}
}
}
{
if (!IsPostBack)
{
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= i; j++)
{
int k = i * j;
if (i == j)
{
Response.Write(" " + i + " * " + j + " = " + k + "<br/>");
}
else
{
Response.Write(" " + i + " * " + j + " = " + k);
}
}
}
}
}