一个菜鸟题,那位高手有时间帮看看!!
我现在学到循环语句,老师叫我们编个9*9乘法口决表,我想了2天都没想出来!!那位高手指点一下!!!!
------解决方案--------------------呵呵~~
StringBuilder sb = new StringBuilder();
for (int i = 1; i < 10; i++)
{
for (int j = 1; j <=i; j++)
{
sb.AppendFormat( "{0} X {1} = {2} ", j, i, i * j);
}
sb.Append( "\r\n ");
}
Console.Write(sb.ToString());
Console.Read();