for(int x=-3;x<=3;x++)
{
for(int y=-3;y<=3;y++)
{
if(Math.Abs(x)==Math.Abs(y))
Console.Write('O');
else
Console.Write('.');
}
Console.WriteLine();
}
大写字母O,太坑了,不是数字0
{
for(int y=-3;y<=3;y++)
{
if(Math.Abs(x)==Math.Abs(y))
Console.Write('O');
else
Console.Write('.');
}
Console.WriteLine();
}
大写字母O,太坑了,不是数字0
switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼");
default: Console.Write("发五仁月饼"); break;
}
}
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼");
default: Console.Write("发五仁月饼"); break;
}
}
2017-05-26
string[] a={"关羽","张飞","赵云","马超","黄忠"};
for(int x=0; x<a.Length;x++)
{ Console.Write(a[x]+",");}
注:这里a不可换成"五虎上将"
for(int x=0; x<a.Length;x++)
{ Console.Write(a[x]+",");}
注:这里a不可换成"五虎上将"