Last active
February 12, 2016 22:41
-
-
Save ardamavi/965f1227e2c2f7f9dadd 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
| // | |
| // main.c | |
| // javaİleDikÜçgenYapımı | |
| // | |
| // Created by Arda Mavi on 11.02.2016. | |
| // Copyright © 2016 Arda Mavi. All rights reserved. | |
| // | |
| #include <stdio.h> | |
| int main(int argc, const char * argv[]) { | |
| 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. | |
| printf("*"); | |
| // Ekrana " * " işareti yazdırılacak. | |
| } | |
| printf("\n"); | |
| // Yeni bir satıra geçilecek | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment