Created
June 2, 2018 14:29
-
-
Save allenpbiju/a9ea66c241dd88edf9b5bc8990ab0648 to your computer and use it in GitHub Desktop.
Fibonacci Series
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> | |
int main() | |
{ | |
int a=0,b=1,c=1,n; | |
printf("Enter the limit: "); | |
scanf("%d",&n); | |
printf("%d",a); | |
while(b<n) | |
{ | |
printf("\n%d",c); | |
c=a+b; | |
a=b; | |
b=c; | |
} | |
getch(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment