搜题
已收录475621道考试试题
丨 最后更新:2026-01-23”“ 搜索结果
为您找到相关结果约475621个
有以下程序
#include
using namespace std;
double power (double x, int n)
{ double val = 1.0;
while (n--) val *= x;
return(val); }
int main()
{ int i;
int value = 0;
char ch;
for (i=7; i>=0; i--)
{ cin >> ch;
if (__________)
value += power(2,i);}
cout<
查看更多
有以下程序
#include
using namespace std;
class P{
char nameP;
public:
P(char *name="123"){strcpy(nameP,name);}
char*getName(){
return nameP;}
virtual char *getType(){
return "P";} };
class B:public P
{ char nameB;
public:
B(char*n1,char *n2):P(n1){strcpy(nameB,n2);}
char *getName(){return nameB;}
char*getType(){
return "B";} };
void showP(P *p){
cout<getType()<<":"<getName()<
查看更多
有以下程序,程序的功能是菜单选择:选择A输出:ADD;选择D输出:DELETE ;选择S输出:SORT;选择Q则退出。
#include
using namespace std;
int main()
{char choice;
while(________)
{
cout << "Menu: A(dd) D(elete) S(ort) Q(uit),Select one:";
cin >> choice;
if (choice == 'A')
{cout << "ADD" << endl;
continue;}
else if (choice == 'D')
{cout << "DELETE " << endl;
continue;}
else if (choice == 'S')
{cout << "SORT" << endl;
continue;}
else if (choice == 'Q')
break;
}
}
请为横线处选择合适的程序( )
查看更多
有以下程序
#include
using namespace std;
____________________
int main()
{int a=1,b=2,c=3;
cout<
查看更多
有以下程序
#include
#include
using namespace std;
int main()
{ vector A(10);
int count=0,n;
cout<<"请输入n的值:";
cin>>n;
A.__________(n);
for(int i=2;i<=n;i++)
if(i%3==0&&i%5==0) A=i;
for(i=0;i
查看更多
有以下程序
#include
using namespace std;
class A
{float *p; int n;
public:
A(int s){ n=s; p=new float;}
~A() {delete p;}
int Getn() const
{ return n; }
float & operator(int i)
{ return _________;}
void Print()
{int i;
for(i=0;i< this->Getn();i++)
{cout<
查看更多
在Linux中,下列错误的是()
查看更多
每天开机在/misc目录下创建一个当天日期的文件夹( )
查看更多
下列不是dns服务主配置文件的是( )。
查看更多
linux防火墙iptabls拒绝所有客户端ping数据包的规则是( )。
查看更多

Andriod下载
iPhone下载