#include
int fib (int i)
{
int pred, result, temp;
pred = 1;
result = 0;
while (i > 0)
{
temp = pred + result;
result = pred;
pred = temp;
i = i-1;
}
return(result);
}
int main ()
{
int n;
cout << "Enter a natural number: ";
cin >> n;
while (n < 0)
{
cout << "Please re-enter: ";
cin >> n;
}
cout << "fib(" << n << ") = " << fib(n) << endl;
return(0);
}
Hotel near Harrah's, Atlantic City, NJ - Mapyro
ReplyDeleteView 김제 출장마사지 reviews, information, directions, and reviews of Harrah's Atlantic City, NJ - 군포 출장마사지 Harrah's Hotel 보령 출장샵 and Casino, Atlantic City, 진주 출장마사지 United States - 안동 출장마사지 Mapyro.