关于语句 include using namespace std; void main( ) { cout 关于语句 #include<iostream> using namespace std; void main( ) { cout < < 100.8989663 < < '; cout < < fixed < < 100.8989663 < <'; cout < < scientific < < 100.8989663 < <';} 的输出结果为A.100.899 100.898966 1.008990e+002B.100.8989663 100.898966 1.008990e+002C.100.899 100.898966 1.008989e+002D.100.899 100.8989663 1.008989e+002
关于语句 include using namespace std; void main( ) { cout < < 100.8989663 <
关于语句 #include<iostream> using namespace std; void main( ) { cout < < 100.8989663 < < '; cout < < fixed < < 100.8989663 < <'; cout < < scientific < < 100.8989663 < <';} 的输出结果为
A.100.899 100.898966 1.008990e+002
B.100.8989663 100.898966 1.008990e+002
C.100.899 100.898966 1.008989e+002
D.100.899 100.8989663 1.008989e+002
相关考题:
有如下程序:includeusing namespace std;Class Base{public:Base(){cout 有如下程序: #include<iostream.h> using namespace std; Class Base { public: Base(){cout<<“BB”;f();} void{(){cout<<“BF”;} }; class Derived:public Base { public: Derived(){cout<<“DD”;} void f(){cout<<“Df”;) }; int mainA.BBBfDDB.BBDfDDDfC.DDD.DDBBBf
下列程序的执行结果是【 】。 include int a; int sum_a(void) { a=a+5; return a; } 下列程序的执行结果是【 】。include <iostream. h>int a;int sum_a(void){a=a+5;return a;}void main(void){a = a+sum_a();cout<<a<<endl;}
有以下程序: include int i=0;void fun(){{static iht i=1; std::cout 有以下程序: # include <iostream> int i=0; void fun() {{static iht i=1; std::cout<<i++<<','; } std:: cout<<i<<','; } int main() { fun(); fun(); return 0; }程序执行后的输出结果是______。A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,
下面程序错误的语句是 #include“iostream.h” ① void main( ) ② { ③ int A=0; ④ int B; ⑤ B=A; ⑥ cout<<B; ⑦ cout<<A; ⑧ }A.②B.③C.④D.⑥
关于语句includeusing namespace std;void main(){cout 关于语句#include<iostream>using namespace std;void main(){cout<<100.8989663<<'';com<<fixed<<100.8989663<<'';cout<<scientific<<100.8989663<<'';}的输出结果为( )A.100.899 100.898966 1.008990e+002B.100.8989663 100.898966 1.008990e+002C.100.899 100.898966 1.008989e+002D.100.899 100.8989663 1.008989e+002
有以下程序include int i = 0;void fun( ){ {static int i = 1;std::cout 有以下程序 #include <iostream> int i = 0; void fun( ) { { static int i = 1; std::cout<<i++<<','; } std::cout<<i<<','; } int main() { fun(); fun(); return 0; } 程序执行后的输出结果是A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,
阅读下列说明和C++代码,填写程序中的空(1)~(6),将解答写入答题纸的对应栏内。【说明】以下C++代码实现一个简单绘图工具,绘制不同形状以及不同颜色的图形。部分类及其关系如图6-1所示。【C++代码】#include?#include?using?namespace?std;class?DrawCircle?{??????//绘制圆形,抽象类? ? ? public: (1);//定义参数为?int?radius,?int?x,?inty? ?virtual~DrawCircle()?{?}};class?RedCircle:public?DrawCircle?{????//绘制红色圆形? ? ? ? public: void?drawCircle(intradius,?int?x,?int?y)?{cout??drawCircle?=?drawCircle;? }? ?virtual~shape()?{?}? public:? ?virtual?void?draw()?=?0;};class?Circle:public?Shape?{????//圆形? ? private:? ? ?int?x,y,radius;? ? public:? Circle(int?x,inty,int?radius,DrawCircle?*drawCircle)? (3)? {? this->x?=?x;? ?this->y?=?y;? ? this->radius?=?radius; }? ? ? public:? void?draw(){? drawCircle?-> (4); }};int?main(){Shape?*redCirclenew?Circle(100,100,10,????(5)????);//绘制红色圆形? Shape?*greenCircle=new?Circle(100,100,10, (6)??);//绘制绿色圆形redCircle >draw();? ?greenCircle?->draw();? ?return?0;}
【填空题】运行下列程序,输出结果是____。 #include <iostream> using namespace std; enum opt{ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN}op; int main(void) { cout<<ONE; cout<<TWO; cout<<SIX; return 0; }
下面代码是否正确?// 以C++17标准编译 #include <iostream> int main() { if (int x {10}; x-- > 0) { x--; } std::cout << x; return 0; }