square of even numbers program in c#.net


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Basics
{
class EvenSqr
{
static void Main()
{
int i = 2;
int x = 0;
if(i%2==0)
{
for (int j = 0; j <= 10; j++)
{
Console.WriteLine(x = i * i);
i = i + 2;
}
}
Console.ReadLine();
}
}
}

Leave a comment