- #include<iostream.h>
- #include<conio.h>
- void main()
- {
- clrscr();
- int a=0,b=1,c=0,n;
- cout<<"Enter the number of terms you wanna see: ";
- cin>>n;
- cout<<a<<" "<<b<<" ";
- for(int i=1;i<=n-2;i++)
- {
- c=a+b;
- a=b;
- b=c;
- cout<<c<<" ";
- }//Coding by: Jerry Johns
- //http://jerryjo94.blogspot.com
- getch();
- }
0 comments:
Post a Comment