int year = 2015;//年份
string text;//请填写代码
text=(year%4)==0?"闰年":"平年";
Console.WriteLine("今年是{0}",text)
string text;//请填写代码
text=(year%4)==0?"闰年":"平年";
Console.WriteLine("今年是{0}",text)
2017-10-06
Console.WriteLine(x+" ")这里面的+" " 其实无所谓的,自己可以打开visual studio
自己试试Console.Write(x+" ")和Console.WiteLine(x)
自己试试Console.Write(x+" ")和Console.WiteLine(x)
2017-10-05
Console.WriteLine(true != false);//输出True
Console.WriteLine(true == false);//输出False
Console.WriteLine(!false);//输出True
Console.WriteLine(true == false);//输出False
Console.WriteLine(!false);//输出True
2017-10-04
int[] score = new int[] {89,39,100,51,94,65,70 };
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<=60 )
Console.Write(score[i]+",");
}
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<=60 )
Console.Write(score[i]+",");
}
2017-10-04
每一次右边结果都有提示,一点一点修改程序,最后找到正确的答案:
if (money>=100000)
Console.Write("送一台微波炉");
else if (money<100000&&money>=50000)
Console.Write("送一套茶具");
else if(money<50000&&money>=10000)
Console.Write("送一袋大米");
else Console.Write("没有礼品");
if (money>=100000)
Console.Write("送一台微波炉");
else if (money<100000&&money>=50000)
Console.Write("送一套茶具");
else if(money<50000&&money>=10000)
Console.Write("送一袋大米");
else Console.Write("没有礼品");
自己琢磨的,如果不对请指正
GetLongLength(0)代表取数组的行数
GetLongLength(1)代表取数组的列数
GetLongLength(0)代表取数组的行数
GetLongLength(1)代表取数组的列数
2017-10-03