还剩2页未读,继续阅读
文本内容:
《可视化程序设计》作业参考答案
一、选择题
1.A
2.A
3.B
4.D
5.C
6.C
7.C
8.D
9.C
10.B
11.B
12.A
13.B
14.B
15.D
16.C
17.A
18.B
19.B
20.D
21.C
22.A
23.B
24.B二.填空题
1.
92.Picturel.Picture=LoadPicture,zpicfile.jpg/z
3.SetFocus
4.-
35.Resize
6.顺序访问方式
7.组合框
8.1毫秒2Timer
9.强制声明变量
10.修改循环条件
11.退出Q
12.程序中含有不正确的代码
1.
1.ocx
14.True TrueTrue
15.地址
16.1系统事件2鼠标事件3键盘事件
17.
918.additem
19.
6620.false
21.2*3=
622.good
23.1-
51124.Debug,print[表达式列表]
25.Load
26.1单文档窗体2单文档窗体
27.1cis2move
28.1frame控件2其它控件
29.可查入对象
30.函数有返回值
31.Action
32.Text
33.1MDIChild.2True
34.index
35.
30036.
337.过程
38.TabStop
39.Locked
40.Stretch三.判断题
1.对
2.对
3.对
4.对
5.对
6.对
7.错
8.对
9.错
10.错
11.对
12.对
13.错
14.错
15.错
16.对
17.对
18.错
19.对
20.错
21.错
22.错
23.对
24.错四.读程题
1.1showcolor
2.
10263.1Rnd2y=y+l3x
4.
1105.
46.1x02xamin
7.1Vai Textl.Text2me
8.1Load2End
9.
310.1sum=sum*i2next i
11.1i mod3=02redim tempn
12.
913.1commandl.enabled=true2commandl.enabled=false五.编程题
1.Private subform_active Dimtextline asstringOpenc:\autoexec.bat”for inputas#1Do whilenot eof1Input#1,textlineTextl.text=textl.text+textlineLoopClose#1End sub
2.Sub sublDim sumAs IntegerDimflag AsBooleanSum=0flag=True Fori=10To50For j=2To i-1If iMod j=0Then flag=False ExitForEnd IfNextIfflag=True Thensum=sum+I PrintiEnd Ifflag二True NextPrintsumEnd Sub
3.Function funnamenas integerifn=0or n=l then-!funname=lelse—f unname=n*f unnamen-lend ifendFunctionPrivate SubTextlKeyPressKeyAscii AsIntegerIf ChrKeyAscii=Chr13Or ChrKeyAscii=Chr10Then Printfunnametextl.textEnd IfEndSub窗体Forml文本框Textl
4.Dim xAs Integerx=Vai InputBox〃〃If x0ThenMsgBox〃正数〃end IfIfx=0ThenMsgBox(〃零〃)End IfIfx0ThenMsgBox(〃负数〃)End IfEndSub。
个人认证
优秀文档
获得点赞 0