program for fibbonicci series (go back »)

July 26 2008, 8:54 AM

#include<conio.h>

#include<iostream.h>

int main()

{

int a,b,c,n;

a=0;

b=1;

cout<<"enter the no of terms you want to print";

cin>>n;

cout<<a<<"\n";

cout<<b;]

for(int i=1;i<=n-2;i++)

{

c=a+b;

cout<<"\n"<<c;

a=b;

b=c;

}

getch();

return(0);

}

 

 

 

 

In c++ programming

Comments

Displaying 0 - 0 of 0 comments

No comments yet. Be the first one to comment!

Add Comment

You must be logged in to comment

Profile

manika1206
  • Male
  • 19 years old

Statistics

Comments 0
Page views 1555