最赞回答 / 打印机维修保养员
int year = 2015;//年份 string text;//请填写代码 text=year % 4 == 0 ? "闰年" : "平年"; Console.WriteLine("今年是{0}", text);
2019-02-18
最新回答 / 慕少0391607
占位符用于字符串中用于指代后面传入的表达式;占位符不参与运算,所以应该求余应放在后面的表达式中 所以 Console.WriteLine("{0}", year%4); 这样就可以,也是解法的一种;或者你可以更直接的Console.WriteLine(year%4);
2019-02-14
输出中间是中文逗号。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
double x = 3.5;
int y = 3;
x++;
Console.WriteLine((int)x>y);
}
}
}
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
double x = 3.5;
int y = 3;
x++;
Console.WriteLine((int)x>y);
}
}
}
2019-02-07
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Console.Write(666);
}
}
}
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Console.Write(666);
}
}
}
2019-01-30