若有以下程序:include using namespace std;define PI 3.14class Point {private: i 若有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int B) { x=a; y=b; } int getx() { return x; } int gety() { reurn y; } }; class Circle: public Point { private: int r; public: Circle(int a,int b.int C) :Point(a,B) r=c; int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle cl(5,7,10); cout<<c 1 .area()<<end1; return 0; } 程序执行后的输出结果是A.314B.157C.78.5D.153.86

若有以下程序:include using namespace std;define PI 3.14class Point {private: i

若有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int B) { x=a; y=b; } int getx() { return x; } int gety() { reurn y; } }; class Circle: public Point { private: int r; public: Circle(int a,int b.int C) :Point(a,B) r=c; int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle cl(5,7,10); cout<<c 1 .area()<<end1; return 0; } 程序执行后的输出结果是

A.314

B.157

C.78.5

D.153.86


相关考题:

若有以下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l 若有以下程序段:include <iostream>using namespace std;int main(){char*p="abcdefgh",*r;long*q;q=(long*)p;q++;r=(char*)q;cout<<r<<end1;return 0;}该程序的输出结果是【 】。

有以下程序:includeusing namespace std;class A{private:int a;public:A(int i){a=i 有以下程序: #include<iostream> using namespace std; class A {private: int a; public: A(int i) {a=i;} void disp() {cout<<a<<“,”;}}; class B {private: int b; public: B(int j) {b=j;} void disp() {cout<<b<<“,”;A.10,10,10B.10,12,14C.8,10,12D.8,12,10

若有如下程序:includeusing namespace std;Class TestClass1{private:int a;public:T 若有如下程序: #include<iostream> using namespace std; Class TestClass1 { private: int a; public: TestClassl(int i) { a=i; } void disp() { cout<<a<<“,”; } }; Class TestClass2 { private: int b; publicA.10,10,10B.10,12,14C.8,10,12D.8,12,10

有以下程序: include using namespace std; int main() {int i=010,j=10;cout 有以下程序:include <iostream>using namespace std;int main(){int i=010,j=10;cout<<(++i)<<","<<i--<<end1;return 0;}则该程序运行后的输出结果是【 】。

以下程序的输出结果是【】。 include using namespace std; int main(){ int sum,i; for( 以下程序的输出结果是【 】。include<iostream>using namespace std;int main(){int sum,i;for(sum=0,i=1;i<5;i++)sum+=i;cout<<sum<<endl;return 0;}

以下程序的输出结果是【】。 include using namespace std; int main() {int s,i;for(s= 以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){int s,i;for(s=0,i=1;i<3;i++)s+=i;cout<<s<<end1;return 0;}

若有以下程序:include using namespace std;int f(){static int i = O;ints= 1;s+=i; 若有以下程序:#include <iostream>using namespace std;int f(){ static int i = O; ints= 1; s+=i; i++; return s;}int main(){ int i, a =0; for(i=0;i<5;i++) a+=f(); cout<<a<<end1; return 0;}程序运行后,输出的结果是( )。A.20B.24C.25D.15

若有以下程序:include using namespace std;int f(){static int i = 0;int s = 1;s+= 若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; int s = 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<endl; return 0; } 程序运行后,输出的结果是A.20B.24C.25D.15

以下程序的执行结果是 ( )。include using namespace std;class sample{private: int 以下程序的执行结果是 ( )。 #include <iostream> using namespace std; class sample { private: int x; public: sample (int A) { x=a; } friend double square(sample s); }; double square(sample s) {A.20B.30C.900D.400

若有以下程序: include using namespace std;int f(){static int i = 0;ints= 1;s+=i 若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; ints= 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<endl; return 0; } 程序运行后,输出的结果是A.20B.24C.25D.15

若有以下程序: include using namespace std; int main() {char str[10];cin>>str;co 若有以下程序:include <iostream>using namespace std;int main(){char str[10];cin>>str;cout<< str<<end1;return 0;}当输入为:This is a program!那么执行程序后的输出结果是【 】。

有以下程序:includeusing namespace std;definePl 3.14Class Point{private:int x,y 有以下程序: #include<iostream> using namespace std; #definePl 3.14 Class Point {private: int x,y; public: Point(int a,intB) {X=a; y:b;} int getx() <return x;} int gety() {return y;}}; class Circle:public Point {priA.314B.157C.78.5D.153.86

有以下程序:include include using namespace std;class base{private: cha 有以下程序: #include <iostream> #include <string> using namespace std; class base { private: char baseName[10]; public: base ( ) { strcpy (baseName, "Base"); } virtual char *myName() {A.DerivedBaseB.BaseBaseC.DerivedDerivedD.BaseDerived

有以下程序:includeincludeusing namespace std; class point{private:double 有以下程序: #include<iostream> #include<math> using namespace std; class point { private: double x; double y; public: point(double a,double B) { x=a; y=b; } friend double distance (point a,point B) ;A.1B.5C.4D.6

以下程序的输出是【】。 include using namespace std; fun(intm) { static int n=1; n=m 以下程序的输出是【 】。include<iostream>using namespace std;fun(intm){static int n=1;n=m*n;return(n);}void main(){int i;for(i=1;i<=3;i++) cout<<fun(i);}

若有以下程序: include usingnamespace std; class Sample { private: const int n; 若有以下程序:include <iostream>using namespace std;class Sample{private:const int n;public:Sample(int i) :n(i) {)void print(){cout<<"n="<<n<<end1;}};int main(){sample a(10);a.print();return 0;}上述程序运行后的输出结果是【 】。

若有以下程序:include using namespace std;class myClass{private: int var;public: 若有以下程序: #include <iostream> using namespace std; class myClass { private: int var; public: myClass(int i) { var=i; } void add() { s+=var; } static int s; void display() { cout<<s<<end1; } }; int myClass::s=0; int main ( ) { myClass a(1),b(2),c(3); a.add(); b.add(); c.dislay(); return O; } 程序执行后的输出结果是( )。A.1B.4C.3D.7

有以下程序:include include using namespace std;class point{private: doub 有以下程序: #include <iostream> #include <math> using namespace std; class point { private: double x; double y; public: point(double a,double b) { x=a; y=b; } friend double distance(point a,point b) ; }; double distance(point a,point b) { return sqrt ((a.x-b.x)* (a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } int main ( ) { point pl(1,2); point p2 (5, 2); cout<<distance (pl,p2) <<end1; return 0; } 程序运行后的输出结果是( )。A.1B.5C.4D.6

若有以下程序:include using namespace std;class A{private:int a;public:A(int i){ 若有以下程序: #include <iostream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<<","; } }; class B { private: int b; public: B(int j) { b=j; } void disp () { cout<<b<<","; } }; class C : public B,public A { private: int c; public: C(int k):A(k-2),B(k+2) { c=k; } void disp () { A::disp(); B::disp(); cout<<c<<endl; } }; int main() { C obj(10); obj.disp(); return 0; }A.10,10,10B.10,12,14C.8,10,12D.8,12,10

若有以下程序:include using namespace std;define PI 3.14class Point{private: in 若有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; } int gety() { return y; } }; class Circle : public Point { private: int r; public: Circle(int a, int b,int c) :Point(a,b) { r=c; } int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle c1(5,7,10); cout<<c1.area()<<end1; return 0; } 程序执行后的输出结果是( )。A.314B.157C.78.5D.153.86

若有以下程序:includeusing namespace std;class A{private:int a;public:A(int i){a 若有以下程序: #include<iostream> using namespace std; class A {private: int a; public: A(int i) {a=i;} void disp() {cout<<a<<“,”;}}; class B {private: int b; public: B(int j {b=j;} void disp() {cout<<b<<A.10,10,10B.10,12,14C.8,10,12D.8,12,10

有以下程序:include using namespace std;define PI 3.14class Point{ private:int 有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; }A.314B.157C.78.5D.153.86

若有以下程序:include using namespace std;class A{private: int a;public: A(int i 若有以下程序: #include <iostream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp() { cout<<a<<", "; } }; class B { private: int b; public: B(int j) { b=j; } void disp() { cout<<b<<", "; } }; class C : public B,public A { private: int c; public: C int k) :A(k-2),B(k+2) { c=k; } void disp() { A: :disp (); B::disp(); cout<<c<<end1; } }; int main () { C ebj (10); obj .disp (); return 0; } 程序执行后的输出结果是( )。A.10,10,10B.10,12,14C.8,10,12D.8,12,10

若有以下程序:include using namespace std;class point{private: int x, y;public: 若有以下程序: #include <iostream> using namespace std; class point { private: int x, y; public: point ( ) { x=0; y=0; } void setpoint(int x1,int y1) { x=x1; y=y1;A.12,12B.5,5C.12,5D.5,12

若有以下程序:include using namespace std;class Base{private: int x;protected: i 若有以下程序: #include <iostream> using namespace std; class Base { private: int x; protected: int y; public: int z; void setx(int i) { x=i; int getx () { return x; } }A.1,2,3,4B.产生语法错误C.4,3,2,1D.2,3,4,5

请选出以下程序段的输出结果 ( )。include using namespace std;define MIN(x,y)(x) 请选出以下程序段的输出结果 ( )。 #include <iostream> using namespace std; #define MIN(x,y) (x)<(y) ?(x) : (y) int main () { int i,j,k; i=10; j=15; k=10*MIN(i,j); cout<<k<<end1; return 0; }A.15B.100C.10D.150

若有以下程序:include using namespace std;class A{private: int a;public: A(int 若有以下程序: #include <iost ream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<<", "; } }; class B { private:A.10,10,10B.10,12,14C.8,10,12D.8,12,10