有如下程序:
#include <iostream>
using namespace std;
class Sample
friend long fun(Sample s);
public:
Sample(long
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 15:02:34
免费下载:《单项选择》Word试卷
有如下程序:
#include <iostream>
using namespace std;
class Sample
friend long fun(Sample s);
public:
Sample(long
A.x=a;
private:
long x;
;
long fun(Sample s)
if(s.x<2)return 1;
return s.x*fun(Sample(s.x-1));
int main( )
int sunl=0;
for(inti=0;i<6;i++)sum+=fun(Sample(i));
tout<<sum:
return 0;
程序的输出结果是A) 120
B.16
C.154
D.34
本题关键词:程序,有序镜检,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序,生产程序;