首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序: #include #include using namespace std; int main(){ cout
有如下程序: #include #include using namespace std; int main(){ cout
admin
2020-07-30
21
问题
有如下程序:
#include
#include
using namespace std;
int main(){
cout<
cout<<12.3456793<<__________<<98765;
return 0;
}
若程序的输出是12.345679x98765xxxxx,则划线处缺失的部分是( )。
选项
A、setw(10)
B、setfill(ˊxˊ)
C、setprecision(8)
D、fight
答案
A
解析
根据程序输出的结果最后5个位置用x进行填充,又因为setw(10)设置输出的宽度效果只对一次输出有效。所以划线处应该填写setw(10)。
转载请注明原文地址:https://kaotiyun.com/show/gDyp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有如下语句序列:ifstreaminfile("DATA.DAT");if(infile.good())cout<<"A";else{cout<<"B";ofstreamoutfile("DATA.DAT");if(outfile.fail
有如下程序:#include<iostrearn>usingnamespacestd;intmain(){inti,s=0;for(i=1;s<20;i+=2)s+=i*i;cout<<i<<endl;return0;}运行这个
+下列语句中,与语句“n=(a>b?(b>c?1:0):0);”的功能等价的是()。
下列选项中,正确的C++表达式是()。
关键字unsigned不能修饰的类型是()。
为类Matrix重载下列运算符时,只能作为Matrix类成员函数重载的运算符是()。
若PAT是一个类,则程序运行时,语句“PAT{*ad}[3];”调用PAT的构造函数的次数是()。
请使用VC6或使用【答题】菜单打开考生文件夹proj2下的工程pmj2,其中有矩阵基类MatrixBase、矩阵类Matrix和单位阵UnitMatrix的定义,还有main函数的定义。请在横线处填写适当的代码并删除横线,以实现上述类定义。此程序的正确输出
下列叙述中正确的是()。
下列符号中不属于C++关键字的是()。
随机试题
InBritain,peoplehavedifferentattitudestothepolice.Mostpeoplegenerally【C1】______themandthejobtheydo—althoughther
A.易引起DICB.易引起失血性休克C.易引起宫腔粘连D.易引起人流综合征E.易引起子宫穿孔人流术中过度刺激宫颈的后果是
口腔念珠菌病常发生于以下情况,除外
砷盐检查方法中,醋酸铅棉花的作用是
女婴,4个月。足月儿,体检指标正常,此月龄最适合添加的辅食是
在涉外刑事诉讼中,关于国籍的确认,下列哪些做法是正确的?()
某工程时标网络图如下,说法正确的是()。
请选择最适合的一项填入问号处,使之符合之前四个图形的变化规律。
(1)Foranysurfer,nothingbeatstheideaofjusthangingoutinabeachridingthewavesallday.Thethrillofridinggiantbr
A、Lendhisbookonthecampus.B、Buyanewbook.C、Readthenewspaper.D、Writeanadvertisementinthenewspaper.B女士说从报纸上得知周五下
最新回复
(
0
)