for (int i = 1; i <= 7; i++)
{
for (int j = 1; j <= 7; j++)
{
Console.Write(i == j || i + j == 8 ? 'O' : '.');
}
Console.WriteLine();
}
Console.ReadKey();
{
for (int j = 1; j <= 7; j++)
{
Console.Write(i == j || i + j == 8 ? 'O' : '.');
}
Console.WriteLine();
}
Console.ReadKey();
2022-02-10
for (int x = 1; x <= y; x++)
2022-01-23
A和B不一樣的地方主要是!運(yùn)算符無法直接運(yùn)用于整數(shù)運(yùn)算符,再加上邏輯邏輯運(yùn)算符的優(yōu)先級,也就!(邏輯非)優(yōu)先級是高于>(大于運(yùn)算符)的,實(shí)在不明白直接去VS跑一跑就知道了
2021-12-27
我這樣寫的
for (int x=0;x<=6;x++)
{
for(int y=0;y<=6;y++)
{
if (y==x||y==6-x)
Console.Write('o');
else
Console.Write('.');
}
Console.WriteLine();
for (int x=0;x<=6;x++)
{
for(int y=0;y<=6;y++)
{
if (y==x||y==6-x)
Console.Write('o');
else
Console.Write('.');
}
Console.WriteLine();
2021-12-22
age = age -2前面是一個完整的打印輸出句子后面age = age -2這個語句后面少一段語句所以運(yùn)行了也沒用。
2021-10-19
for(int x=1;x<=7;x++)
{
for(int y=1;y<=7;y++)
{
if(x==y||x+y==8)
Console.Write("o");
else
Console.Write(".");
}
Console.WriteLine();
}
{
for(int y=1;y<=7;y++)
{
if(x==y||x+y==8)
Console.Write("o");
else
Console.Write(".");
}
Console.WriteLine();
}
2021-08-18