C++ PROGRAM FOR FIBONACCI SERIES USING STDIO.H February 22, 2015 Get link Facebook X Pinterest Email Other Apps #include<conio.h> #include<stdio.h> int main(){ int f=0,s=1,nn,n,i; printf("Enter Number: "); scanf("%d",&nn); for(i=0;i<nn;i++){ if(nn<=1) n=i; else{n=f+s; f=s; s=n;} printf("\n%d",n);} getch(); } Output: Comments
Comments
Post a Comment