110,538
社区成员
发帖
与我相关
我的任务
分享
public static void Main()
{
static string[5][10] bc;
for(int i=0;i<5;i++)
for(int j=0;j<10;j++)
{
bc[i][j]=0;
}
do{
Console.WriteLine ("请输入您要购买的座位号:");
string str1=Console.ReadLine();
string[] a=str1.Split('-');
int h=int.Parse(a[0]);
int v=int.Parse(a[1]);
}while(bc[h][v]!=1)
for(int i=0;i<5;i++)
{
for(int j=0;j<10;j++)
{
if(a[0]==i && a[1]==j)
{
Console.WriteLine ("●");
bc[i][j]=1;
}
else
{
if(bc[i][j]==1)
{
Console.Write("●");
}
else
{
Console.Write("○");
}
}
Console.WriteLine();
}
}
}