看板 C_Sharp 關於我們 聯絡資訊
這次我改用 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