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

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

以下程序运行结果为: a=4 if a>5: b=a**2 else: b=a**3 print(b)


参考答案和解析
B 本题中del(char*s)函数实现的功能是逐个读入s数组中的字符,如果遇到数字。则将数字存在s中,遇到非数字字符则跳过。所以最后输出的应该是字符串s中所有数字的个数。
更多 “以下程序运行结果为: a=4 if a5: b=a**2 else: b=a**3 print(b)” 相关考题
考题 ( 7 )有以下程序#include stdio.hmain (){ int a=1,b=2,c=3,d=0;if ( a==1 )if ( b!=2 )if ( c==3 ) d=1;else d=2;else if ( c!=3 ) d=3;else d=4;else d=5;printf ( " %d\n " ,d ) ;}程序运行后的输出结果是 【 7 】 。

考题 执行下列程序,输入数字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="abcd" B="bcde" E=Right(A,3)" F=Mid(B,2,3) If E<F Then Print E+F Else Print F+EA.cdebcdB.cddC.cdcdD.bcdcde

考题 下列程序的运行结果是()。 include main() {int a=2,b=3,c=4;ifa 下列程序的运行结果是( )。#include<stdio.h>main(){ int a=2,b=3,c=4;ifa<B)if(b<0)c=0;else c+=1;printf("%d\n",C) ;}A.2B.3C.5D.4

考题 运行以下程序段后,输出结果为 【 】 。a=3:b=2Print a*(a+B)

考题 有以下程序:#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

考题 运行下列程序段后,显示的结果为 J1=63 J2=36 If J1< J2 Then Print J2 Else Print J1A.63B.36C.55D.2332

考题 运行以下程序段后,输出结果为【 】。a=4: b=2Print a*(a-B)

考题 编写如下程序: Private Sub Form. Click() a$=: "4321": b$="abcd" For 3=1 To 4 Print Mid$(a$,5-j,1)+Nid$(b$, j, 1); Next j Print End Sub 程序运行后,单击窗体,其输出结果为 ______。A.alb2c3d4B.b4c3d2elC.eld2c3b4D.la2b3c4d

考题 有以下程序: main() { int a=3,b=4,c=5,d=2; if(a>b) if(b>c) printf("%d",d++ +1); else printf("%d",++d +1); printf("%d\n",d); } 程序运行后的输出结果是( )。A.2B.3C.43D.44

考题 下列程序的运行结果为【 】。A="1"B="2"A=Val(A) +Val(B)B=Val("12")If A<>B Then Print A-B Else Print B-A

考题 下列程序段的执行结果为 X=5 Y=-20 If Not X>0 Then X=Y-3 Else Y=X+3 Print X-Y;A.-3B.5C.3D.25

考题 有以下程序inculde stdio.hmain(){ int a=1,B=2,c=3,d=0;iF(a==1)iF(B!=2)iF(c==3) d=1;else d=2;else iF(c!=3) d=3;else d=4;else d=5;printF(“%d\n”,d);}程序远行后的输出结果是【 】。

考题 下列程序的运行结果是()。include main(){int a=2,b=3,c=4; if(a 下列程序的运行结果是( )。 #include <stdio.h> main() { int a=2,b=3,c=4; if(a<b) if(b<0) c=0; else c+=1; printf("%d\n", c); }A.2B.3C.5D.4

考题 运行下列程序段后,显示的结果为( )。 J1=23 J2=32 If J1<J2 Then Print J2 Else Print JlA.23B.32C.55D.2332

考题 下列程序的运行结果是()。includemain(){int a=2,b=3,c=4; if(a 下列程序的运行结果是( )。 #include<stdio.h> main() { int a=2,b=3,c=4; if(a<B) if(b<0) c=0; else c+=1; printf("%d\n",C) ; }A.2B.3C.5D.4

考题 下面程序段执行结果为x=Iht(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.fail

考题 下列程序段的执行结果为______。 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

考题 阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是A.3 5 7 9 30B.1 3 5 7 9C.2 4 6 8 20D.11 15 17 19 20

考题 运行以下程序后,显示的结果为 ______。 Dim x(5) x(0) =1 For i=1 To 5 x(i)=x(i-1)*i Print x(i) Next i EndA.1 2 3 4 5B.1 2 6 24 120C.1 2 6 12 20D.1 1 2 3 4

考题 编写如下程序: Private Sub Form_Click() a$="54321":b$="abcde" For j=1 To 5 Print Mid$(a$,6-j,1)+Mid$(b$,j,1); Next j Print End Sub 程序运行后,单击窗体,其输出结果为 ______。A.a1b2c3d45eB.a5b4c3d2e1C.e1d2c3b4a5D.1a2b3c4d5e

考题 下列程序段的执行结果为 A=2 B=5 If A * B 0A.T 下列程序段的执行结果为 A=2 B=5 If A * B < 1 Then B=B - 1 Else B= - 1 Print B -A > 0A.TrueB.FalseC.-1D.1

考题 有以下程序 int a=2; int f(int n) { static int a=3; int t=0; if(n%2) {static int a=4; t+=a++;} else {static int a=5; t+=a++;} return t+a++; } main ( ) { int s=a, i; for (i=0;i<3; i++) s+=f (i) print f ("%d\n" , s ); } 程序运行后的输出结果是A.26B.28C.29D.24

考题 有以下程序: include main ( ) int a=3,b=4,c=5,d=2;if(a>b) if(b>c)printf("%d", 有以下程序: #include < stdio. h > main ( ) int a=3,b=4,c=5,d=2; if(a>b) if(b>c)printf("%d",d++ +1); else printf( "% d", + + d + 1 ); printf( "% d \n" ,d); 程序运行后的输出结果是( )。A.2B.3C.43D.44

考题 下列程序段的执行结果为_________。 A = "abcd" B = "bcde" E = Right(A, 3) F = Mid(B, 2, 3) If E<F Then Print E+F Else Print F+EA.cdebcdB.cddC.cdcdD.bcdcde

考题 下面程序段执行结果为 x=Int(Rnd()+3) Select Case x Case 5 Print "excellent" Case 4 Print "good" Case 3 Print"pass" Case Else Print"fail" End SelectA.excellentB.goodC.passD.fail

考题 下列程序段的执行结果为______。 x=5 y=3 If Not x > 1 Then y=y+1 Else x=x-1 Print x;yA.5 3B.5 4C.3 4D.4 3