Last active
November 28, 2015 12:23
-
-
Save cagataycali/4157e458b44bbd0e82e1 to your computer and use it in GitHub Desktop.
Birden yüze kadar olan tek sayıları toplayan ekrana yazan c programı ( for ile )
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
#include <stdio.h> | |
/* | |
1'den 100'e kadar olan tek sayıları toplayıp ekrana yazacağız. | |
*/ | |
int main(void) | |
{ | |
int toplam = 0; | |
for (int i = 0; i <= 100; i = i + 1 ) | |
{ | |
toplam += ++i; | |
printf("Sayı : %d , toplamı : %d \n",i,toplam ); | |
} | |
printf("Toplam: %d \n",toplam ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment