填空题
阅读下面程序: #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
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
类ostream的成员函数 【10】 用于执行无格式输出,成员函数put用于输出单个字符。
点击查看答案
填空题
语句cout<<setiosflags(ios::showpos)<<38<< <<-38<<end1;的输出结果为 【7】 。
点击查看答案
相关试题
C++本身没有定义I O操作,但I O操作包...
有如下程序:#include <iostream>using...
下面程序的执行结果是 【15】 。#incl...
虚基类说明格式如下:slass派生类名 【1...