作者if4 (逍遥游)
看板C_Sharp
标题Re: [问题] 九九乘法表
时间Sat May 5 01:37:19 2012
这次我改用 while 回圈...让你看看有多复杂...
我现在已经安装试用版,测试可用...^_^
int x = 1;
int y = 1;
string str;
Console.Write(" ");
while(x < 10)
{
str = Convert.ToString(x);
Console.Write(str.PadLeft(3));
x++;
}
Console.Write("\n");
while(y < 10)
{
Console.Write(y);
x = 1;
while(x < 10)
{
str = Convert.ToString(x * y);
Console.Write(str.PadLeft(3));
x++;
}
Console.Write("\n");
y++;
}
Console.ReadLine();
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.25.181.174