网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
当你输入95时,下列程序运行的结果是 results = int(input('成绩为:')) if 100>=results>=90: print('A') elif 90>results>=75: print('B') elif 0<=results<75: print('C') else: print('输入错误!')
A.A
B.B
C.C
D.输入错误!
参考答案和解析
B
更多 “当你输入95时,下列程序运行的结果是 results = int(input('成绩为:')) if 100>=results>=90: print('A') elif 90>results>=75: print('B') elif 0<=results<75: print('C') else: print('输入错误!')A.AB.BC.CD.输入错误!” 相关考题
考题
下列程序的输出结果是 ( )#includeusing namespace std;class A{int apublic:A():a(9){}virtual void print() const {cout};class B:public A{char b;public:B(){b= ‘S’;}void print()const{cout};void show(AaX){X,print()}int main(){ Ad1;*p;Bd2;p=d2;d1,print();d2,print();p-print();show(d1);show(d2);return 0;}
考题
执行下列程序,输入数字3,则输出结果为______。Private Sub Command1_Click()a=inputBox("Input a Number")If a>5 ThenGoTo L5Else If a>2 ThenGoTo L2ElseGoTo L3End IfExit SubL5:Print a Mod 5Exit SubL3:Print a Mod 3Exit SubL2:Print a Mod 2End Sub
考题
下列块结构条件语句,正确的是( )。A.If x>10 Then print"a" Else if x>5 Then print"b" Else if x<5 Then print"c" End ifB.if x>10 Then print"a" Else if x>5 Print"b" Else Print"c" End ifC.If x>10 Then print"a" Else if x>5 Then print"b" Else x<5 Then Print"c" End ifD.If x>10 Then Print"a" Else if x>5 Then print"b: Else Print"c" End if
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() x=Input Box("Input") Select Case x Case 1,3 Print"分支1" Case Is>4 Print"分支2" Case Else Print"Else分支" End Select End Sub 程序运行后,如果在输入对话A.分支1B.分支2C.Else分支D.程序出错
考题
(19)如果A为整数且|A|=10,则打印“OK”,否则打印“Error”,表示这个条件的单行格式If语句是 A.If Int(A)=A And Sqr(A)=10 Then Print“OK”Else Print “Error” B.If Fix(a)=A And Abs(a)=10 Then Print“OK”Else Print “Error” C.If Int(A)=A And (A=10 ,A=-10) Then Print“OK”Else Print “Error” D.If Fix(A)=A And A=10, Abs A=-10 Then Print“OK”Else Print “Error
考题
如果A为整数且,|A|>=10,则打印“OK”,否则打印“Error”,表示这个条件的单行格式If语句是( )。A.If Int(A)=A And Sqr(A)>=10 Then Print"OK"Else Print "Error"B.If Fix(A)=a And Abs(A)>=-10 Then Print"OK"Else Print "Error"C.If Int(A)=A And(A>=10,A<-10) Then Print"OK"Else Print "Error"D.If Fix(A)=A And A>=10,And A<=-10 Then Print"OK" Else Print "Error"
考题
以下程序的执行结果是______ include include void print(int n) { if(n
以下程序的执行结果是______include<iostream.h>include<iomanip.h>void print(int n){if(n!=0){print(n-1);for(int i=1;i<=n;i++=cout<<setw(3)<<i;cout<<endl;}}void main(){print (4);}
考题
下列程序的输出结果是【】。 include using namespace std; class A {int a; public:A()
下列程序的输出结果是【 】。include <iostream>using namespace std;class A {int a;public:A():a(9){}virtual void print() const { cout<<a;};};class B: public A {char b;public:B( ){b='S';}void print() const {cout<<b;}};void show(A x){ x.print0;}int main(){ Ad1,*p;B d2;p=d2;d1.print();d2.print0;p->print();show(d1);show(d2);return 0;}
考题
已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End IfB.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End IfC.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End SelectD.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"
考题
有如下程序: include using namespace std; class TestClass { private: int x,y; pu
有如下程序: #include<iostream> using namespace std; class TestClass { private: int x,y; public: TestClass (int i,int j) { x=i; y=j; } void print() { cout<<"print1"<<end1; } void print()const { cout<<"print2"<<end1; } }; int main() { const TestClass a(1,2); a.print(); return 0; } 该程序运行后的输出结果是( )。A.print1B.print2C.print1 print2D.程序编译时出错
考题
下列程序的运行结果为 include void print(double a) {cout
下列程序的运行结果为#include<iostream. h>void print(double a){cout < < ++a;}void print(int a, int b){cout < < b < < a;}void main( ){print(1.2) ;tout < <" ";print(3,4) ;}A.1.2 34B.2.2 34C.1.2 43D.2.2 43
考题
如果x为整数且|x|>=100,则打印“OK”,否则打印“Error”,表示这个条件的单行格式 If语句是A.If Int((x)=x And Sqr(x)>=100 Then Print "OK" Else Print "Error"B.If Fix(x)=x And Abs(x)>=100 Then Print"OK"Else Print"Error"C.If Int(x)=x And (x>=100,x<=-100)Then Print"OK"Else Print"Error"D.If Fix(x)=x And x>=100 And x<=-100 Then Print "OK" Else Print "Error"
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) x=InputBox(“Input”) Select Case x Case 1,3 Print“分支1” Case Is4 Print“分支2” Case Else Print“Else分支” End SelectEnd Sub程序运行后,如果在输入对话框中输入2,则窗体上显示的是A.分支1B.分支2C.Else分支D.程序出错
考题
如果A为整数且|A|>=100,则打印“OK”,否则打印“Error”,表示这个条件的单行格式If语句是A.If Int(A)=A And Sqr(A)>=100 Then Print "OK" Else Print "Error"B.If Fix(A)=A And ABS(A)>=100 Then Print "OK" Else Print "Error"C.If Int(A)=A And(A>=100,A<=-100)Then Print "OK: Else Print "Error"D.If FiX(A)=AAnd A>=100 And A<=-100 Then Print "OK" E1se Print "Error"
考题
下面程序段执行结果为 x=Int(Rnd()+4) Select Case x Case 5 Print"excellent" Case 4 Print"good" Case 3 Print "pass" Case Else Print "fail" End SelectA.excellentB.goodC.passD.fall
考题
运行下列程序: x=Input Box("input value Of x”) Select Case x Case IsO y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10
考题
下列程序的运行结果为includevoid print(double a){ cout
下列程序的运行结果为 #include<iostream.h> void print(double a) { cout<<++a; } void print(int a,int b) { cout<<b<<a; } void main( ) { print(1.2); tout<<""; print(3,4); }A.1.2 34B.2.2 34C.1.2 43D.2.2 43
考题
下列程序段的执行结果为______。 x=Int (Rnd+4) Select Case x Case 5 Print“优秀” Case 4 Print“良好” Case 3 Print“通过” Case Else Print“没有通过” End SelectA. 优秀B.良好C.通过D.没有通过
考题
下面程序段执行结果为( )。 x=Int(Rnd()+4) Select Case x Case 5 Print"excellent" Case4 Print"good" Case 3 Print"pass" Case Else Print"fail" End SelectA.excellentB.goodC.passD.fail
考题
运行下列程序: 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.-7B.-9C.-8D.-10
考题
下列程序的运行结果为#includevoid print(double a){cout++a;}void print(int a,int B){cout}void main(){print(1.2);cout” ”;print(3,4);}A.1.2 34B.2.2 34C.1.2 43D.2.2 43
考题
单选题a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。A
0B
10C
-10D
程序异常
热门标签
最新试卷