using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int i = 0;
for (i = 1900; i <= 1950; i++)
{
if(
((i % 4==0) && (i % 100 !=0)) ||
((i % 4==0) && (i % 100 ==0) && (i%400==0))
)
{
Console.Write(i + " ");
}
}
Console.WriteLine();
}
}
}
Consider the program:
Output