填空题
阅读下面程序:
#include <iostream.h>
int fun2(int m)
if(m%3==0)
return 1;
else
return 0;
void fun1(int m, int &s)
int i;
for (i=1; i<m; i++)
if(fun2(i))
S=S*i;
void main()
int n=9, s=2;
fun1(n, s);
cout<<s<<end1;
该程序的运行结果是
【12】
。
【参考答案】
36
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
虚函数必须是类的 【9】 。
点击查看答案
填空题
有如下程序: #include <iostream> using namespace std; class PARENT public: PARENT() cout<< PARENT ; ; class SON: public PARENT public: SON() cout<< SON ; ; int main() SON son; PARENT *p; p=&son; return 0; 执行上面程序的输出是 【13】 。
点击查看答案
相关试题
虚基类说明格式如下:slass派生类名 【1...
下面程序的执行结果是 【15】 。 #in...