单选题 VB
题号 #2539252

在窗体上画1个命令按钮,并编写如下事件过程:
Private Sub Command1_Click()
Dim a(3,3)
For m=1 To 3
For n=1 To 3
If n=m or n=4-m Then
a(m,n)=m+n
Else
a(m,n)=0
End If
Print a(m,n);
Next n
Print
Next m
End Sub
运行程序,单击命令按钮,窗体上显示的内容为(  )。

进入在线模考

参考答案

B

答案解析

本题考查了嵌套的For循环,答案为B选项。

你可能感兴趣的试题

A.Private Sub Co mmand1_Click()
Di nt BAs Books
Open "c :\Person .txt"For Output As #1
B .Name =InputBox("输入姓名")
B .TelNum=InputBox("输入电话号码")
Write #1,B.Name ,B.TelNum
Close #1
End Sub
B.Private Sub Co mmand1_Click()
Di m BAs Books
Open "c :\Person .txt"For Input As #1
B .Name =InputBox("输入姓名")
B .TelNum=InputBox("输入电话号码")
Print #1,B.Name ,B.TelNum
Close #1
End Sub
C.Private Sub Co mmand1_Click()
Di m BAs Books
Open "c :\Person .txt"For Output As #1
Name =InputBox("输入姓名")
TelNo m=InputBox("输入电话号码")
Write #1,B
Close #1
End Sub
D.Private Sub Co mmand1_Click()
Di m BAs Book
Open "c :\Person .txt"For Input As #1
Name =InputBox("输入姓名")
TelNum-InputBox("输入电话号码")
Print #1,B.Name .B.TelNum
Close #1
End Sub
A.Picture1.Picture ="Flie1.jpg
B.Picture1.Picture =LoadPicture("File1.jpg")
C.LoadPicture("File1.jpg")
D.Call LoadPicture("File1.jpg")
找试题 · 找答案 · 找资料 在线模考