static void Main(string[] args)
{
int year = 2015;//年份
string text;
text=year%=4?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
{
int year = 2015;//年份
string text;
text=year%=4?"闰年":"平年";
//请填写代码
Console.WriteLine("今年是{0}",text);
2016-08-31
double money = 60000.00;//存款金额
string a="没有"
if(money>=100000){ Console.WriteLine(a+"送一台微波炉");
}else if(money>=50000){Console.WriteLine(a+"送一套茶具");
}else if(money>=10000){Console.WriteLine(a+"送一袋大米");}else{Console.writeLine("没有礼品");}
string a="没有"
if(money>=100000){ Console.WriteLine(a+"送一台微波炉");
}else if(money>=50000){Console.WriteLine(a+"送一套茶具");
}else if(money>=10000){Console.WriteLine(a+"送一袋大米");}else{Console.writeLine("没有礼品");}
bool i = true;
foreach(int x in num)
{
if(x%7==0)
{
i = false;
break;
}
}
if(i)
Console.WriteLine("没有7的整数倍");
else
Console.WriteLine("有7的整数倍");
}
foreach(int x in num)
{
if(x%7==0)
{
i = false;
break;
}
}
if(i)
Console.WriteLine("没有7的整数倍");
else
Console.WriteLine("有7的整数倍");
}
if(price<=salary){
Console.WriteLine("这月工资够买手机!")
}
else{
Console.WriteLine("洗洗睡吧")
}
why?
Console.WriteLine("这月工资够买手机!")
}
else{
Console.WriteLine("洗洗睡吧")
}
why?