We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Wednesday, June 17, 2015

Write a program to find out the Even or Odd number.


  class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the number");
            int number = int.Parse(Console.ReadLine());
            if (number % 2 == 0)
            {
                Console.WriteLine("The Enter number is Even number");
            }
            else
            {
                Console.WriteLine("The Enter number is Odd number");
            }
            Console.ReadLine();
        }

    }

Output:
Enter the number:5
Your Enter number is Odd number

Enter the number:6

Your Enter number is Even number

No comments: