English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-08-07 19:14:37 · 5 answers · asked by venkataramana r 1 in Computers & Internet Programming & Design

5 answers

int main(void) {
unsigned int first = 0, second = 1, n;

printf("Enter n: ");
scanf("%d", &n);

printf("Fibonacci series is: ");
while( second <= n ) {
printf("%u ", second);
first = second;
second = first + second;
}

return 0;
}

2006-08-09 21:21:16 · answer #1 · answered by swami060 3 · 0 0

Yes there is a series and that series starts like this:
0, 1, 1, 2, 3, 5, 8, 13, 21 and so on...

The way Fibonacci Numbers work is that you add the two digits before the number and keep doing it, and thats how Fibonacci #s work.

2006-08-08 02:23:03 · answer #2 · answered by Daniel™ 4 · 0 0

1 1 2 3 5 8 13 21 34 55

2006-08-08 02:17:55 · answer #3 · answered by rydhel1016 3 · 0 0

Well this is a program where next number is some of its prevoius number


like 1,1,2,3,5,8,13....and so on


code of this program in C++ is as follows


#include
#include

using namespace std;

int main()
{
cout << "-- FIBONACCI SERIES --\n";
cout << "A program to compute the Nth value the \n"
<< "Fibonacci series.\n\n";
cout << "Enter N: ";
int N, FN;

cin >> N;

FN = static_cast(1/sqrt(5)*( pow((1+sqrt(5))/2,N) - pow((1-sqrt(5))/2,N) ));
cout << "The Nth number in the series when N=" << N
<< " is " << FN << endl;

system("PAUSE");
return 0;
}


for more help please visit link

2006-08-08 02:21:46 · answer #4 · answered by waytospark 2 · 0 0

http://www.mpi-sb.mpg.de/~rybal/armc-live-termin/node2.html

2006-08-08 02:19:15 · answer #5 · answered by debashis j 2 · 0 0

fedest.com, questions and answers