C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
C# Odd Even Program
WhatsApp
Rajesh Gonugunta
Jul 11
2016
890
0
0
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
namespace
ConsoleApplication
{
class
OddEven
{
static
void
Main(
string
[] args)
{
for
(
int
i = 1; i < 10; i++)
{
if
(i % 2 == 0)
{
Console.WriteLine(i +
" is Even"
);
}
if
(i % 2 != 0)
{
Console.WriteLine(i +
" is ODD"
);
}
}
Console.ReadLine();
}
}
}
c# ood even