如果把第一个{0}改成{1},第二个{1}改成{0},其他不变,输出就会把性别放置前面,姓名放在后面,类似于把后面的变量看成数组,{}填入数字作为下标
2019-03-17
最新回答 / weixin_慕盖茨3053807
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { int a=8; int b=6; string test=a>b ? "a":"b"; Console.Wri...
2019-03-13
for (int x = 1; x <= 7; x++)
{
for (int y = 7; y >= 1; y--)
{
if (x + y == 8 || x == y)
Console.Write("o");
else
{
Console.Write(".");
}
}
Console.WriteLine();
}
{
for (int y = 7; y >= 1; y--)
{
if (x + y == 8 || x == y)
Console.Write("o");
else
{
Console.Write(".");
}
}
Console.WriteLine();
}
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if(x > y)
continue;
Console.Write(x);
}
Console.WriteLine();//换行
}
{
for (int x = 1; x <= 7; x++)
{
if(x > y)
continue;
Console.Write(x);
}
Console.WriteLine();//换行
}
2019-03-08