有如下程序:include<iostream>using namespace std;long fun(int n){if(n>2)return(fun(n-1)+fu

有如下程序: include<iostream> using namespace std; long fun(int n) { if(n>2) return(fun(n-1)+fun (n-2)); else return 2; } int main() { cout<<fun(3)<<end1; return 0; } 则该程序的输出结果应该是 ()。 A.2 B.3 C.4 D.5

时间:2023-08-11 14:07:39

相似题目