Skip to content

Commit

Permalink
Merge pull request #93 from Divyangana-12/main
Browse files Browse the repository at this point in the history
Create Fibonacci series
  • Loading branch information
aman-raza authored Oct 9, 2020
2 parents 5023fa8 + fc54230 commit c6c7b66
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Fibonacci series
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <stdio.h>

int main(void)
{
int n, i,a,b,c;
printf("\n enter the number of terms");
scanf("%d", &n);
a=0, b=1;
printf("\n the fibonacci series: ");
printf("\t %d \t %d", a,b);
for(i=2; i<n; i++)
{
c=a+b;
printf("\t%d", c);
a=b;
b=c;
}
}

0 comments on commit c6c7b66

Please sign in to comment.