1. Ana Sayfa
  2. Programlama Temelleri

C# Console 1 121 12321 şeklinde devam eden diziyi ekrana yazan program

C# Console 1 121 12321 şeklinde devam eden diziyi ekrana yazan program
0

1 121 12321 şeklinde devam eden diziyi ekrana yazan programı C# Console uygulaması ile yazın ekran çıktısı aşağıdaki gibi olmalı

       1
      121
     12321
    1234321
   123454321
for(int i=1;i<=10;i++){
	 for(int j=1;j<=10-i;j++){

    Console.Write(" ");
    }

for(int k=1;k<=i;k++){

    Console.Write(k);
    }

for(int l=1;l<i;l++){

    Console.Write(i-l);
    }
	Console.WriteLine();

		}
		Console.ReadLine();

1121

Bu İçeriğe Tepkin Ne Oldu?
Subscribe
Bildir
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Yorum
Inline Feedbacks
View all comments