for (int x = 0; x < 12 ; x++ )//请填写代码
{
Console.WriteLine((x + 1) + " ");
}
{
Console.WriteLine((x + 1) + " ");
}
2018-02-27
贼简单,在21行直接加入
else
Console.WriteLine("6");就行了.因为第一个if语句没有对应else,直接添加上就可以
else
Console.WriteLine("6");就行了.因为第一个if语句没有对应else,直接添加上就可以
2018-02-26
for(int x=1;x<8;x++)
{
for(int y=1;y<8;y++)
{
/* if(x==y||x==8-y)
{
Console.Write("O");
}
else
{
Console.Write(".");
}*/
string t = x==y||x==8-y?"O":".";
Console.Write(t);
}
Console.WriteLine();
}
}
}
}
{
for(int y=1;y<8;y++)
{
/* if(x==y||x==8-y)
{
Console.Write("O");
}
else
{
Console.Write(".");
}*/
string t = x==y||x==8-y?"O":".";
Console.Write(t);
}
Console.WriteLine();
}
}
}
}