已收录475621道考试试题

最后更新:2026-01-22

”“ 搜索结果

为您找到相关结果约475621

下面程序的输出结果是( ) #include int main() { int i, n = 0; float x = 1, y1 = 2.1 / 1.9, y2 = 1.9 / 2.1; for ( i = 1; i < 22; i++) x = x * y1; while ( x != 1.0 ) { x = x * y2; n++; } printf( "%d\n", n ); return 0; }
查看更多
有以下程序 #include using namespace std; class A {int *p,n; public: A():p(0),n(0){} A(int q, int m) {n=m; p=__________; for(int i=0;i查看更多
有以下程序 #include using namespace std; class Point {public: Point(float xx=0, float yy=0) {X=xx;Y=yy;} float GetX() {return X;} private: float X,Y;}; class Rectangle: private Point {public: Rectangle(float x, float y, float w, float h):Point(x,y) {W=w;H=h;} float GetX() {return ___________;} float GetH() {return H;} float GetW() {return W;} private: float W,H;}; int main() { Rectangle r(1,2,3,4); cout<
查看更多
有以下程序 #include using namespace std; int main(){ int sum; for(int i=0; i<6; i+=2) { sum=i; for(int j = i; j<6; j++) {if(i+j>5) continue; sum+=j;} } cout<
查看更多
有以下程序 #include using namespace std; int a={1,2,3,4,5,6,7,8,9,0}; void fun(int *pa,int n); int main() {int m=10; fun(a,m); cout<0;i--) *(pa+6)+=pa; } 运行结果是( )
查看更多
有以下程序 #include #include using namespace std; int main() { deque A; for(int i=0;i<5;i++) A.push_back(2*i+1); while(___________) { cout << A.front() << " "; A.pop_front(); } cout << endl;} 程序的运行结果是1 3 5 7 9,请为横线处选择合适的程序( )
查看更多