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

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

阅读下列程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击一次窗体,再单击命令按钮,将显示一个输入对话框,如果在对话框中输入20,则程序的输出结果为

A.0

B.20

C.40

D.无任何输出


参考答案

更多 “ 阅读下列程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击一次窗体,再单击命令按钮,将显示一个输入对话框,如果在对话框中输入20,则程序的输出结果为A.0B.20C.40D.无任何输出 ” 相关考题
考题 program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为(). A567 563B567 567C567 167D567 163

考题 下列根据此段程序的运算的结果正确的是( )。 Dim × As Single Dim y As Single If × 0 Then y=3 Elself × l Then y=2 * x Else:y=-4 * x 十 6 End IfA.当x=2时,y=-2B.当x=-1时,y=-2C.当x=0.5时,y=4D.当x=-2.5时,y=ll

考题 下列根据此段程序的运算的结果正确的是( )。 Dim x AS Single Dim y As Single If x < 0 Then y = 3 ElseIf x< 1 Then y = 2 * x Else:y = -4 * x + 6 End IfA.当x=2时,y=-2B.当X=-1时,y=-2C.当x=0.5时,y=4D.当x=-2.5时,y=11

考题 下面程序段的运算结果正确的是( )。 Dim x As Single Dim y As Single If x < 0 Then y=3 Elself x < 1 Then y=2*x Else: y= -4 * x+6 End IfA.当x=2时,y=-2B.当x=1时,y=3C.当x=0.5时,y=-4D.当x=-2.5时,y=11

考题 分析以下程序的运行结果是_______ #include “stdio.h” func(int a ,int b) { int c; c=a+b; return c; } int main() { int x=6,y,r; y=x+2; r=func(x++,y); printf("%d %d %dn",x,y,r); return 0; }

考题 假设类X以类Y作为它的一个基类,并且X类的名字func()支配Y类的名字func(),obj为类X的对象,则obj.func()语句实现的功能为:A.先执行类X的func(),再执行访问类Y的func()B.先执行类Y的func(),再执行访问类X的func()C.执行类X的func()D.执行类Y的func()

考题 设 x = 10; y = 20,下列语句能正确运行结束的是:()A.max = x >y ? x : yB.if(x>y) print(x)C.if x>y max=xD.if x<y: min=x else: min=y

考题 设 x = 1; y = 10,下列语句能正确运行结束的是________。A.if(x>y) print(x)B.max = x >y ? x : yC.if x>y max=xD.if x<y: min=x else: min=y

考题 1、设 x = 1; y = 10,下列语句能正确运行结束的是________。A.if(x>y) print(x)B.max = x >y ? x : yC.if x>y max=xD.if x<y: min=x else: min=y

考题 11、下面哪些定义是类型正确的?A.f :: (Integer, Integer) - Float f (x,y) = x / yB.f :: (Integer, Integer) - Float f (x,y) = (fromInteger x) / (fromInteger y)C.f :: (Integer, Integer) - Float f (x,y) = 3*x + yD.f :: (Integer, Integer) - Integer f (x, y) = 3*x + y