Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
316 B
2
Indexable
Never
#include<stdio.h>
void fibonacci(int num)
{
	int f=1,temp=0,sum;
	for(int i=0;i<num;i++)
	{
	    if()
		    sum = temp+f;
		    temp=f;
	        f=sum;
            printf("%d\n",sum);
	}
}
int main()
{
	int n;
	printf("Enter the limit to the fibonacci numbers:");
	scanf("%d",&n);
	fibonacci(n);
}