填空题
阅读下面程序:
#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
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
友元类的所有成员函数都是另一个类的 【8】 函数。
点击查看答案
填空题
C++本身没有定义I O操作,但I O操作包含在C++实现中。C++标准库iostream提供了基本的I O类。I O操作分别由类istream和 【11】 提供。
点击查看答案
相关试题
虚基类说明格式如下:slass派生类名 【1...
有如下程序: #include <iostream> u...
下面程序的执行结果是 【15】 。 #in...
类ostream的成员函数 【10】 用于执行...