wap in c odd and even
Answers
Answered by
2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int i;
Console.Write("Enter a number: ");
i=int.Parse(Console.ReadLine());
if(i%2==0)
{
Console.Write("Entered number is an Even number...");
Console.Read();
}
else
{
Console.Write("Entered number is an Odd number...");
Console.Read();
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int i;
Console.Write("Enter a number: ");
i=int.Parse(Console.ReadLine());
if(i%2==0)
{
Console.Write("Entered number is an Even number...");
Console.Read();
}
else
{
Console.Write("Entered number is an Odd number...");
Console.Read();
}
}
}
}
Similar questions