Comparing integers : int Calculation « Data Type « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

    class Program
    {
        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));
        }
    }








2.7.int Calculation
2.7.1.integers and arithmetic operators
2.7.2.int variable assignment
2.7.3.Overflowing an Integer Value
2.7.4.Bitwise AND of Integer
2.7.5.Comparing integers
2.7.6.Comparing the Prefix and Postfix Increment Operators
2.7.7.Using Binary Operators