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

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

单击命令按钮后,下列程序代码的执行结果是______。

Public Sub fun (a As Integer, b As Integer, c As Integer)

Do

a=b+ c

n=n+1

Loop While n > 3

End Sub

Private Sub command1_ click()

Dim m As Integer, n As Integer, i As Integer

For i = 0 To 2: m = n + 1: Next i

For i = 1 To 2: Call fun (m, n, i): Next i

For i = 0 To 3

Print m;

Next i

End Sub


参考答案

更多 “ 单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub ” 相关考题
考题 若a=1,b=2,下面程序执行后,a和b的值分别为 。architecture rtl of entityName issignal a, b: integer;beginprocess (a, b)variable c: integer;begina =b ;c := a ;b = c ;end process;end rtl ; A.1,2B.2,1C.1,1D.2, 2

考题 如果Add函数的调用代码为:func main() {var a Integer = 1var b Integer = 2var i interface{} = asum := i.(Integer).Add(b)fmt.Println(sum)}则Add函数定义正确的是() A.type Integer intfunc (a Integer) Add(b Integer) Integer { return a + b}B.type Integer intfunc (a Integer) Add(b *Integer) Integer { return a + *b}C.type Integer intfunc (a *Integer) Add(b Integer) Integer { return *a + b}D.type Integer intfunc (a *Integer) Add(b *Integer) Integer { return *a + *b}

考题 若要在图3-19窗口(窗体名为frm001)中新增一个命令按钮,单击该命令按钮后,图像框所显示的图像就会成为此窗口的背景图像。请写出该命令按钮单击事件过程内的程序代码。

考题 在窗体上画—个命令按钮(名称为Command1),并编写如下代码:Function Fun1 (ByVala As Integer, b As Integer)As Integer Dim t As Integer t=a-b b=t+ a Fun 1=t+ bEnd FunctionPrivate Sub Command1_ Click() Dim x As Integer x=10 Print Fun1(Fun1 (x,(Fun1(x,x-1))),x-1)End Sub程序运行后,单击命令按钮,输出结果是 ______。A.10B.0C.11D.21

考题 在窗体上添加一个命令按钮,然后编写其单击事件过程为:则单击命令按钮后消息框的输出结果是( )。A. 7B. 8C. 9D. 13

考题 单击一次命令按钮之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() a = fun(4) + fun(5) Print a; End Sub Public Function fun (n As Integer) Static Num For i = 1 To n Num = Num + i Next i fun = Num End FunctionA.15B.20C.35D.40

考题 阅读程序: Function F(a As-Integer) b=0 Static c b=b+1 c=c+1 F=a+b+c End Function Private Sub Command1_Click() Dim a As Integer a=2 For i=1 To 3 Prim F(A)Next i End Sub 运行上面的程序,单击命令按钮,输出结果为 ______。A.4 4 4B.4 5 6C.4 6 8D.4 7 9

考题 8、下面哪些是将分数化为浮点数的正确定义?A.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = a/b###SXB###B.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = (fromInteger a)/ (fromInteger b)###SXB###C.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = fromInteger (a/b)###SXB###D.type Fraction = (Integer, Integer) rateq :: Fraction - Float rateq (a,b) = (fromIntegral a)/ (fromIntegral b)###SXB###E.ty

考题 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