Created
February 11, 2016 19:28
-
-
Save ardamavi/01add18668efbf6ef74f to your computer and use it in GitHub Desktop.
C# İle Dik Üçgen Yapımı
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Arda Mavi | |
| using System; | |
| namespace javaİleDikÜçgenYapımı | |
| { | |
| class MainClass | |
| { | |
| public static void Main (string[] args) | |
| { | |
| for(int a=0;a<5;a++){ | |
| // Döngünün beşkere dönmesini sağlayan döngü. | |
| // a bir tamsayı ve 0 değerine eşit. | |
| // Döngü a, 5'den küçük olduğu sürece döngü tekrar edecek. | |
| // a sayısı her tekrarda 1 arttırılacak. | |
| for(int b=0;b<=a;b++){ | |
| // Kaçıncı satır ise o kadar dönen döngü. | |
| // Örneğin : ikinci satırda ikikere dönecek. | |
| // b bir tamsayı ve 0 değerine eşit. | |
| // Döngü b, a'ya eşit ya da a'dan küçük olduğu sürece döngü tekrar edecek. | |
| // b sayısı her tekrarda 1 arttırılacak. | |
| Console.Write("*"); | |
| // Ekrana " * " işareti yazdırılacak. | |
| } | |
| Console.Write("\n"); | |
| // Yeni bir satıra geçilecek | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment