Created
October 2, 2011 13:13
-
-
Save symtkn/1257442 to your computer and use it in GitHub Desktop.
Girilen bir N değerine kadar fibonacci dizisini ekrana yazan program
This file contains 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> | |
int main() | |
{ | |
int a, b, c; | |
int n; | |
printf("n değerini giriniz: "); | |
scanf("%d", &n); | |
a = 1; | |
b = 1; | |
printf("%d\t%d\t", a,b); | |
c = a + b; | |
while (c <= n){ | |
printf("%d", c); | |
a = b; | |
b = c; | |
c = a + b; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment