布尔赋值运算符

来源:互联网 发布:时间序列数据举例 编辑:程序博客网 时间:2024/05/01 10:53
static void Main(string[] args)
        {
            Console.WriteLine("Enter an integer:");
            int myInt = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("iNTEGER LESS THAN 10?{0}",myInt<10);
            Console.WriteLine("Integer between 0 and 5?{0}",(0<=myInt)&&(myInt<=5));
            Console.WriteLine("Bitwise AND of Integer and 10={0}",myInt&10);
            Console.ReadKey();
        }
 使用Convert.ToInt32()从字符串输入中得到一个整数.
原创粉丝点击