using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
for (int x = 0; x < 9; x++)
{
if ((x == 0) || (x == 8))
{
for (int i = 0; i < 9; i++)
System.Console.Write("*");
System.Console.WriteLine(" ");
}
else
{
for (int i = 0; i < 9; i++)
{
if ((i == 0) || (i ==8))
{
System.Console.Write("*");
}
else
System.Console.Write(" ");
}
System.Console.WriteLine(" ");
}
}
System.Console.ReadLine();
}
}
}
這是用個*組成的邊長為9*9的長方形 那個高手能幫我把for 改成while的循環.
!!!! 行的話馬上采納.