网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。

  • A、0
  • B、10
  • C、-10
  • D、程序异常

参考答案

更多 “a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。A、0B、10C、-10D、程序异常” 相关考题
考题 若有如下程序:public class Test {public static void main (String[] args) {int x=20;if (x>10) System.out.print(x-=5);if (x>5) System.out.print(x--);}}则程序运行后的输出结果是【 】。

考题 下列块结构条件语句,正确的是( )。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

考题 下列程序输出的结果为【 】。Private Sub Commandl_Click( )Dim a As Booleana = TrueIf a Then GoTo 11 Else GoTo 2211:Print "VB";22:Print "VC"End Sub

考题 有以下程序:#includestdio.hmain( ){ int a=1,b=0;if(--a)b++;else if(a==0)b+=2;else b+=3:print[(%d\n,b);}程序运行后的输出结果是( )。A.0B.1C.2D.3

考题 如果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"

考题 运行下面程序后,正确的输出结果是 ______。Private Sub Command1_ Click() x = 6 if x >6 then Print "x>6": Else if x <8 then Print "x<8"; Else if x = 6 then Print "x=6": End if End if End ifEnd SubA.x<8 x=6B.x<8C.x=6D.x<8或x=6

考题 已知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"不及格"

考题 若有以下程序段: int r=8; print("%d\n",r1): 输出结果是( )。 A.16B.8S 若有以下程序段: int r=8; print("%d\n",r1): 输出结果是( )。A.16B.8C.4D.2

考题 有如下程序: 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.程序编译时出错

考题 下面程序的输出结果是( )。A)0B)1C)10D)9

考题 下列程序段,运行后输出的内容是 a=2 c=1 c=c+a If c<10 Then Print c Else Print a End IfA.3B.7C.9D.6

考题 有如下程序: Private Sub Commandl_Cick() a=10:b=50 Rem Print a;b Print bla Print a;b End Sub 运行后,单击命令按钮后的输出结果是 ( )A.10 50 50 10 10 50B.10 50C.10 50 50 10D.50 10

考题 下列程序段,在运行时最早输出的内容是 a=2 c=1 AAA: c=c + a If c<10 Then Print c GoTo AAA Else Print"10以内的奇数显示完毕。" End IfA.3B.7C.9D.6

考题 下列程序的输出结果是()。 include main() {int a=4;print f("%d\n", (a+=a-=a*a)); }A 下列程序的输出结果是( )。 #include<stdio.h> main() { int a=4; print f("%d\n", (a+=a-=a*a)); }A.-8B.14C.0D.-24

考题 以下程序输出结果是 include main ( ){int i=0,a=0; while ( i 以下程序输出结果是 #include <stdio.h> main ( ) { int i=0,a=0; while ( i<2 0 ) { for(;;) { if ((i%10) ==0) break; else i--; } i+=11; a+=i; } print f ( "%d\n" , a); }A.21B.32C.33D.11

考题 下面程序段的输出结果是:int a = 2;System.out.print( a++);System.out.print( a);System.out.print(++a); A.333B.334C.234D.233

考题 有如下VB程序,它的输出结果是()。 S=0 For I=1 To 10 S=S+I Next I Print “S=”;SA、0B、S=S+IC、55D、S=55

考题 下面程序段运行后,显示结果是()。Dim xIf x Then Print x Else Print x+1A、0B、1C、-1D、显示出错信息

考题 b=10def index():b=5index()print(b)输出结果是()A、10B、5C、0D、程序异常

考题 b=10a=20ifab:print(‘abigger’)else:print(‘bbigger’)以上代码输出内容是()A、abigger’B、bbigger’C、10D、20

考题 下面程序段运行后,显示结果是()。DimxIf x Then Print x Else Print x+1A、0B、1C、-1D、显示出错信息

考题 下列程序段:Dim x If x Then Print x Else Print x+1运行后,显示的结果是()。A、1B、0C、-1D、出错

考题 单选题a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。A 0B 10C -10D 程序异常

考题 单选题下面程序段运行后,显示结果是()。DimxIf x Then Print x Else Print x+1A 0B 1C -1D 显示出错信息

考题 单选题下列程序段:Dim x If x Then Print x Else Print x+1运行后,显示的结果是()。A 1B 0C -1D 出错

考题 单选题b=10def index():b=5index()print(b)输出结果是()A 10B 5C 0D 程序异常

考题 单选题下面程序段运行后,显示结果是()。Dim xIf x Then Print x Else Print x+1A 0B 1C -1D 显示出错信息