Dizi ile Yıldız karakterini kullanarak ekrana üçgen şekli oluşturma C# Console
[code lang=”csharp”]
using System;
using System.Collections.Generic;
using System.Linq;//www.gorselprogramlama.com
using System.Text;
namespace dizlerle_ekrana_yildiz
{
class Program
{
static void Main(string[] args) //www.gorselprogramlama.com
{
string[] yildiz = new string[21];
string gec = "*";
for (int i = 1; i <= 20; i++)//www.gorselprogramlama.com
{
yildiz[i] += gec;
gec += "*";
}
for (int i = 0; i <=20; i++)
{
Console.WriteLine(yildiz[i]);
}
Console.ReadLine();//www.gorselprogramlama.com
}
}//www.gorselprogramlama.com
}
[/code]
