阅读下面程序: #include <iostream.h> long fib(i
题型:填空题
问题:
阅读下面程序:
#include <iostream.h>
long fib(int n)
if (n>2)
return (fib(n-1)+fib(n-2));
else
return (2);
void main()
cout<<fib(3)<<endl;
则该程序的输出结果应该是______。
阅读下面程序:
#include <iostream.h>
long fib(int n)
if (n>2)
return (fib(n-1)+fib(n-2));
else
return (2);
void main()
cout<<fib(3)<<endl;
则该程序的输出结果应该是______。