Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   Input any number and find Even number and Not Even number (http://www.go4expert.com/forums/input-t25859/)

Patel 22May2011 10:02

Input any number and find Even number and Not Even number
 
Code:

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the no. :");       
            int a = Int32.Parse(Console.ReadLine());
            if (a % 2 == 0)
                Console.WriteLine("Even no. :");
            else
                Console.WriteLine("Not even");
                Console.ReadLine();

      }
    }
}



All times are GMT +5.5. The time now is 07:27.