窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序: Dim y As Integer Private Sub Command1_Click( ) Dim x As Integer x=2 Text1.Text=p2(p1(x),y) Text2.Text=p1(x) End Sub Private Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+y End Function Private Function p2(x As Integer, y As Integer)As Integer p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 17:17:32
免费下载:《单选题》Word试卷
窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序: Dim y As Integer Private Sub Command1_Click( ) Dim x As Integer x=2 Text1.Text=p2(p1(x),y) Text2.Text=p1(x) End Sub Private Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+y End Function Private Function p2(x As Integer, y As Integer)As Integer p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
A.2 4 2 4
B.2 4 4 8
C.4 4 8 8
D.10 10 58 58
本题关键词:同一工程两个业务,出门按钮,控制按钮,钢窗框,金属窗框,钢门窗框,木窗框料,救助呼叫按钮,个体性,个体身心发展顺序性;