9 Sep 2017

How to make even odd number programmer in c sharp


How to make even odd number programmer in c sharp

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

namespace how_to_make_even_odd_program
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;
            Console.Write("Enter the  Number : ");
            i = Convert.ToInt16(Console.ReadLine());
            if (i % 2 == 0)
            {
                Console.Write("Print the value of even num ");
                Console.ReadLine();
            }
            else 
            {
                Console.Write("Print the value of odd num ");
                Console.ReadLine();
            }
            Console.ReadKey();

        }
    }
}

Output is :- Even number print


Output is :- Odd number print



No comments:
Write comments

Popular Posts

Popular Posts

Translate

Total Pageviews