Skip to content

Instantly share code, notes, and snippets.

@symtkn
Created October 2, 2011 13:13
Show Gist options
  • Save symtkn/1257442 to your computer and use it in GitHub Desktop.
Save symtkn/1257442 to your computer and use it in GitHub Desktop.
Girilen bir N değerine kadar fibonacci dizisini ekrana yazan program
#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