Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save allenpbiju/a9ea66c241dd88edf9b5bc8990ab0648 to your computer and use it in GitHub Desktop.
Save allenpbiju/a9ea66c241dd88edf9b5bc8990ab0648 to your computer and use it in GitHub Desktop.
Fibonacci Series
#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