//fib series till 10.
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
a=0;
b=1;
int i;
cout << a<< "\t" << b <<"\t" << a+b<< "\t";
for(i=1; i<= 7;i++)
{c=a+b;
cout << c << "\t";
a=b;
b=c;
}
cin.get();
return 0;
}
Thursday, 24 January 2013
fib series 1st 10
08:19
ATEEK
No comments
0 comments:
Post a Comment