Skip to content

Commit

Permalink
Create Fibonaaci.c
Browse files Browse the repository at this point in the history
  • Loading branch information
o10a19 authored and x0lg0n committed Nov 1, 2024
1 parent 0752474 commit befb47b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions C/Fibonaaci.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <stdio.h>
void main(){
int n,a=0,b=1,c,i;
printf("Enter a number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
printf("%d,",a);
a=b;
b=c;
}
}

0 comments on commit befb47b

Please sign in to comment.