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();
}
}
}
No comments:
Post a Comment