//Program to check whether the entered number
//is even or odd
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace cs1
{
class Program
{
static void Main(string[] args)
{
int x;
Console.WriteLine("Please Enter any number");
x = int.Parse(Console.ReadLine());
if (x % 2 == 0)
{
Console.Write("The Number is Even");
Console.Read();
}
else
{
Console.Write("The Number is Odd");
Console.Read();
}
}
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.