You are on page 1of 3

Program no.

01
/*Program for fiboncci series

upto n no*/

#include<conio.h>

#include<stdio.h>

void main()

int a,b,c,n,i;

clrscr();

printf("enter any no ");

scanf("%d",&n);

a=0;

b=1;

printf("%d\n%d\n",a,b);

for(i=3;i<=n;i++)

c=a+b;

printf("%d\n",c);

a=b;

b=c;
}

getch();

/*output
enter any no 8

13

*/

You might also like