namespace Test
{
class Program
{
static void Main(string[] args)
{
int year = 2015;//年份
string text = year % 4 ==0 ? "闰年" : "平年";//请填写代码
Console.WriteLine("今年是{0}",text);
}
}
}
{
class Program
{
static void Main(string[] args)
{
int year = 2015;//年份
string text = year % 4 ==0 ? "闰年" : "平年";//请填写代码
Console.WriteLine("今年是{0}",text);
}
}
}
2016-05-17
Console.WriteLine(9+"2.2");//输出92.2,因为"2.2"是字符串,所以9也被转换为"9",+起的作用是连接字符串
2016-05-16
最赞回答 / qq_夏日秋冥
在C#中,声明一个变量,1. 变量名称必须以字母或下划线开头,2.可以包含数字,但可以包含空格,标点符号,运算符号,美元符号等各种异常符号,3.不能与C#中的关键字和库函数名称相同。
2016-05-16