搜题
已收录475621道考试试题
丨 最后更新:2026-01-23”“ 搜索结果
为您找到相关结果约475621个
下面程序的输出结果是( )
#include
using namespace std;
void max(int i, int j)
{
cout << (i>j) ? i : j;
}
int main()
{
int m = 016, n = 18;
max(m, n);
return 0;
}
查看更多
下面程序的输出结果是( )
#include
using namespace std;
void max(int i, int j)
{
cout << (i>j) ? i : j;
}
int main()
{
int m = 016, n = 18;
max(m, n);
return 0;
}
查看更多
下面程序的输出结果是( )
#include
using namespace std;
class MD
{
protected:
float miles;
public:
void setDist(float d){miles=d;}
virtual float getDist(){return miles;}
float square(){return getDist()*getDist();}
};
class FeetDist: public MD
{
protected:
float feet;
public:
void setDist(float);
float getDist(){return feet;}
float getMiles(){return miles;}
};
void FeetDist::setDist(float ft)
{
feet=ft;
MD::setDist(feet/2);
}
int main()
{
FeetDist feet;
feet.setDist(8);
cout<
查看更多
下面程序的输出结果是( )
#include
int fun(int i)
{
return (i==2)?1:(i+fun(i-2));
}
int main()
{
printf("%d",fun(10));
return 0;
}
查看更多
下面程序的输出结果是( )
#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,请为横线处选择合适的程序( )
查看更多

Andriod下载
iPhone下载