江苏省2009年2月信息技术学业水平测试VB操作题WORD含答案.docVIP

  • 19
  • 0
  • 约2.42万字
  • 约 9页
  • 2016-09-28 发布于贵州
  • 举报

江苏省2009年2月信息技术学业水平测试VB操作题WORD含答案.doc

江苏省2009年2月信息技术学业水平测试VB操作题WORD含答案

操作题(5道 共40分) 【第1题】 打开“Z:\13\工程1.vbp”,完善程序并保存。 实现功能:在Text1、Text2、Text3中输入三个整数后,单击“输出最大值”按钮后,在Label3中显示这3个数中的最大值。 Private Sub Command1_Click() Dim a, b, c, max As Integer a = Val(Text1.Text) b = Val(Text2.Text) c = Val(Text3.Text) If a b Then max = a Else ① If c max Then ② Label3.Caption = CStr(③) End Sub 【第2题】 打开“Z:\12\工程1.vbp”,完善程序并保存。 实现功能:在Text1中输入一个代表秒数的整数后,单击“计算”按钮后,在Label1、Label2、Label3中显示对应的小时、分钟和秒数。如在Text1中输入“3672”,Label1、Label2、Label3中分别显示“1”、“1”、“12”,即1小时1分12秒。 Private Sub Command1_Click() Dim h, m, s, ss As Integer ss = Val(①) h = ② m =

文档评论(0)

1亿VIP精品文档

相关文档