填空题
以下程序的执行结果是
【13】
。
#include<iostream.h>
void main()
cout.fill(’*’);
cout.width(10);
cout<<123.45<<endl;
cout.width(8);
cout<<123.45<<endl;
cout.width(4);
cout<<123.45<<endl;
【参考答案】
****123.45
**123.45
123.45
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
将x+y*z中的“+”用成员函数重载,“*”用友元函数重载应写为 【12】 。
点击查看答案
填空题
以下程序运行后的输出结果是 【11】 。 #include<iostream.h> void main() char a[]= abcdabcabfgacd ; int i 1=0,i2=0,i=0; while (a[i]) if (a[i]==’a’) il++; if (a[i]==’b’) i2++; i++; cout<<il<<’ ’<<i2<<endl;
点击查看答案
相关试题
下面程序的功能是:将字符数组a中下标值为...
当循环队列非空且队尾指针等于队头指针时,...
下列程序的输出结果是 【10】 。 #in...
下列程序的输出结果是 【9】 。 #incl...