using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OddNumber
{
class Program
{
static void Main()
{
Console.WriteLine("--First Odd numbers Example--");
for (int i = 0; i <= 20; i++)
{
if (i % 2 != 0)
{
Console.WriteLine(i);
}
}
Console.WriteLine("--Second Odd numbers Example--");
for (int i = 0; i <= 10; i++)
{
if (IsOdd(i))
{
Console.WriteLine(i);
}
}
Console.ReadLine();
}
public static bool IsOdd(int value)
{
return value % 2 != 0;
}
}
}