using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("输入一个数字:");
int myInt = Convert.ToInt32(Console.ReadLine());
bool isLessThan10 = myInt < 10;
bool isBetween0And5 = (0 <= myInt) && (myInt <= 5);
Console.WriteLine("数字小于10? {0}",isLessThan10);
Console.WriteLine("数字在0和5之间? {0}", isBetween0And5);
Console.ReadKey();
}
}
}
本文转自TBHacker博客园博客,原文链接:http://www.cnblogs.com/jiqing9006/p/6707627.html,如需转载请自行联系原作者