if(money >= 100000){
Console.WriteLine("送一台微波炉") }
else if(money < 100000 && money>=50000){
Console.WriteLine("送一套茶具");}
else if(money < 50000 && money >= 10000){
Console.WriteLine("送一袋大米");}
else if(money < 10000){
Console.WriteLine("没有礼品");}
Console.WriteLine("送一台微波炉") }
else if(money < 100000 && money>=50000){
Console.WriteLine("送一套茶具");}
else if(money < 50000 && money >= 10000){
Console.WriteLine("送一袋大米");}
else if(money < 10000){
Console.WriteLine("没有礼品");}
输出中间是中文逗号。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
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
闰年定义是可以被4整除,不能被100整除,但是被400整除可以啊
int year = 2015;//年份
bool answer;
string text;
answer = (year % 4 == 0 && year % 100 != 0)|year%400==0;
text = answer == true ? ("闰年" ): text =( "平年");
Console.WriteLine("今年是{0}", text);
int year = 2015;//年份
bool answer;
string text;
answer = (year % 4 == 0 && year % 100 != 0)|year%400==0;
text = answer == true ? ("闰年" ): text =( "平年");
Console.WriteLine("今年是{0}", text);
2019-01-13