标题:unsigned long __cdecl fibonacci(unsigned long) 错误
取消只看楼主
cancerhd
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2007-7-25
 问题点数:0 回复次数:1 
unsigned long __cdecl fibonacci(unsigned long) 错误

帮看看下面程序有什么错误了。谢了
#include<iostream.h>

unsigned long fibonacci(unsigned long);

int main()
{
unsigned long number,result;

cout<<"Enter an integer:";
cin>>number;
result=fibonacci(number);
cout<<"fabonacci("<<number<<")="<<result<<endl;
return 0;
}

unsigned long fabonacci(unsigned long n)
{
if (n == 0 || n == 1)
return 1;
else
return fibonacci(n-1) * fibonacci(n-2);
}

搜索更多相关主题的帖子: fibonacci unsigned long cdecl 
2007-07-30 09:45
cancerhd
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2007-7-25
得分:0 

谢了哈,

2007-07-30 10:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-159081-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.091568 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved