int year = 2015;//年份
string text;
text=(year%4)==0?"润年":"平年";//请填写代码
Console.WriteLine("今年是{0}",text);
int year = 2015;//年份
还有一种方法
string text;
if(year%4==0)
text="闰年";
else
text="平年";
Console.WriteLine("今年是{0}",text);
string text;
text=(year%4)==0?"润年":"平年";//请填写代码
Console.WriteLine("今年是{0}",text);
int year = 2015;//年份
还有一种方法
string text;
if(year%4==0)
text="闰年";
else
text="平年";
Console.WriteLine("今年是{0}",text);
2017-05-23
switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
case "小明": Console.Write("发蛋黄月饼"); break;
}
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
case "小明": Console.Write("发蛋黄月饼"); break;
}
2017-05-23
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <=y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
{
for (int x = 1; x <=y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
2017-05-21