//以为等腰三角形
for (int y = 1; y <= 7; y++)
{
for(int z=7;z>0;z--)
Console.Write(" ");
Console.Write(x);
Console.WriteLine();//换行
}
for (int y = 1; y <= 7; y++)
{
for(int z=7;z>0;z--)
Console.Write(" ");
Console.Write(x);
Console.WriteLine();//换行
}
2017-07-13
逗比,要在同一行
Console.Write("我的工资奖金总额是{0}元",salary+prize);
Console.WriteLine("我的税后收入是{0}元",salary+prize-tax);
Console.Write("我的工资奖金总额是{0}元",salary+prize);
Console.WriteLine("我的税后收入是{0}元",salary+prize-tax);
2017-07-13
输出全称
char[,] ch = { {'我','是','软'},{'件','工','程'},{'师','啦','!'}};
Console.WriteLine("{0}{1}{2}{3}{4}{5}{6}{7}{8}", ch[0, 0], ch[0, 1], ch[0, 2], ch[1, 0], ch[1, 1], ch[1, 2], ch[2, 0], ch[2, 1], ch[2, 2]);
char[,] ch = { {'我','是','软'},{'件','工','程'},{'师','啦','!'}};
Console.WriteLine("{0}{1}{2}{3}{4}{5}{6}{7}{8}", ch[0, 0], ch[0, 1], ch[0, 2], ch[1, 0], ch[1, 1], ch[1, 2], ch[2, 0], ch[2, 1], ch[2, 2]);
2017-07-13