19 Kasım 2009 Perşembe

C# For Döngüsü

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

namespace forOrnek
{
class Program
{
static void Main(string[] args)
{
// 1
// 12
// 123
// 1234
// 12345

int i, j;

for (i = 1; i <= 5; i++)
{
for (j = 1; j <= i; j++)
{
Console.Write("{0}", j);
}
Console.WriteLine();
}

}
}
}

Hiç yorum yok:

Yorum Gönder