更多"有如下程序: infocase$=InputBox('Inputon"的相关试题:
[单项选择]有如下程序:
infocase$=InputBox("Inputoneletter:")
Select Case infocase$
case"a"
grade$="Verygood"
case"b"
grade$="Good"
case"C"
grade$="OK"
case"d"
grade$="Qualified"
case Else
grade$="Bab"
End Select
Print grade$
运行时从键盘上输入英文小写字母d后,输出的结果是( )。
A. Very good
B. Good
C. Bad
D. Qualified
[单项选择]有如下程序:
x=-5
s=InputBox("input value of s:")
Select Case x
Case x
y=x+1
Case Is=0
y=x+2
Case Else
y=x+3
End Select
Print x; y
运行时,从键盘输入-5,输出的结果是______。
A. -5-2
B. -5-4
C. -5-3
D. -5-5
[单项选择]有如下程序: x = InputBox("Input value of x") Select Case x Case Is > 0 y=y+1 Case Is = 0 y=x + 2 Case Else y=x + 3 End Select Print x, y运行时,从键盘输入-5,输出的结果是( )。
A. -5-2
B. -5-4
C. -5-3
D. -5-5
[单项选择]有如下程序:
infocase$=InputBox("Input one letter:")
Select Case infocase$
Case"a"
grade$="Very good"
Case"b"
grade$="good"
Case"c"
grade$="OK"
Case"d"
grade$="Qualified"
Case Else
grade$="Bad"
End Select
Print grade$
运行时从键盘上输入英文小写字母d后,输出的结果是______。
A. Very good
B. Good
C. Bad
D. Qualified
[填空题]执行以下程序段,并输入1.23,则程序的输出结果应是 【15】 。
N=Str(InputBox("请输入一个实数:"))
p=InStr(N,".")
Print Mid(N,p)
[单项选择]有如下程序:
#inelude
usingnamespacestd;
classTest
{
public:
Test(){n+=2;}
~Test(){n-=3;}
staticintgetNum(){returnn;}
private:
staticintn;
};
intTest::n=1;
intmain()
Test*P=newTest:
deleteP;
cout<<"n="< return0;
}
执行后的输出结果是( )。
A. n=0
B. n=1
C. n=2
D. n=3
[单项选择]有如下程序:
#include
using namespace std;
class Boat;
class Car{
public:
Car(int i):weight(i){ }
friend int Total(const Car &c.const Boat &b); //①
private:
int weight;
};
class Boat{
public:
Boat(int i):weight(i){ }
friend int Total(const Car &c,const Boat &b);
private:
int weight;
};
int Total(const Car &c,const Boat &b){ //②
return c.weight+b.weight;
}
int main( ){
Car c(10);
Boat b(8);
cout<<"The total weight is"<A. 程序编译正确
B. 程序编译时语句①出错
C. 程序编译时语句②出错
D. 程序编译时语句③出错
[单项选择]有如下程序:
#included
usingnamespacestd;
classTestClass{
protected:
TestClass( ){cout<<’X’;}
TestClass(charc){cout< classTestClassl:publicTestClass{
public:
TestClassl(charc){cout< intmain( ){
TestClassld1(’y’);
return0;}
执行这个程序,屏幕上将显示输出( )。
A. y
B. yx
C. xy
D. yy