1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Input any number and find Even number and Not Even number

Discussion in 'C#' started by Patel, May 22, 2011.

  1. Patel

    Patel New Member

    Joined:
    Dec 5, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Lucknow
    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();
    
           }
        }
    }
     
    Last edited by a moderator: May 22, 2011

Share This Page