有如下的C语言程序,运行后的输出结果为()。void S(){int x=1; int y=0;switch(x) {case 0:printf("*0*");break;case 1:printf("*1*");break;case 2:printf("*2*");break;}}void main(){S();}
A.*1*
B.*0**1*
C.*0**1**2*
D.*1**2*
A、*1*
A.*1*
B.*0**1*
C.*0**1**2*
D.*1**2*
A、*1*
A.50-30
B.80
C.20
D.+b
有如下事件过程: Private Sub Command1_Click() b=10 Do Until b=-1 a=InputBox("请输入a的值") a=Val(A)b=InputBox("请输入b的值") b=Val(B)a=a * b Loop Print aEnd Sub程序运行后,依次输人数值30,20,10,-1,输出结果为
A.6000
B.-10
C.200
D.-6000
在窗体上画—个命令按钮,其名称为Command1,然后编写如下程序: Function M(x As Integer,y As Integer) M=IIf(x>y,x,y) End FUNction Private Sub Command1 Click() Dim a As Integer,b As Integer a=100 b=200 Print M(a,B0 End Sub 程序运行后,单击命令按钮,输出结果为【 】。
在窗体上画一个名称为Command1的命令按钮。编写如下事件过程: Private Sub Command1_Click() Dim a As String A=【 】 For i=1 To 5 Print Space(6-i); Mid$(a, 6-i, 2*i-1) Next i End Sub 程序运行后,单击命令按钮,要求窗体上显示的输出结果为: 5 456 34567 2345678 123456789 请填空。
在窗体上画一个命令按钮Command1,然后编写如下程序: Private Sub Command1_Click() Dim arr()As Integer ReDim arr(3) For i=0 To 3 arr(i)=i Next i x=InputBox("请输入一个数字:") If Val(x)>4 Then ReDim art(4) air(4)=x End If Me.Print(arr(4)-art(3)) End Sub 程序运行后,单击命令按钮,在输入对话框中输入12,输出结果为【 】。
假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 S a,b Print a,b End Sub程序运行后,单击命令按钮,输出结果为______ 。
A.5 4
B.1 1
C.1.25 4
D.1.25 1
A.2
B.3
C.4
D.5
在窗体中添加一个命令按钮,编写如下程序: Private Sub Test(p,m,n) p=p+1:m=m+1:n=n+1 Print "Sub: ";p;m;n End Sub Private Sub Command1.Click() a1=1:b=2:c1=3 Call Test((a,b1+3,(c1)) Print "Main:";a1;b1;c1 End Sub 程序运行后,输出结果为
A.Sub: 2 6 4 Main: 2 6 4
B.Sub: 2 6 4 Main: 2 6 4
C.Sub: 2 6 4 Main: 1 2 3
D.Sub: 2 6 4 Main: 2 2 3