求大神帮忙VB答案1.下列程序功能:在窗体的3个文本框(Text1、Text2、Text3)中输入三个数,将它们从大到小

求大神帮忙VB答案
1.下列程序功能:在窗体的3个文本框(Text1、Text2、Text3)中输入三个数,将它们从大到小排序,并在文本框(Text4)中输出排序结果。请填写程序空白处使程序完整。
Private Sub Command1_Click()
a = Val(Text1.Text)
b = (1)   
c = Val(Text3.Text)           
If a < b Then
   (2)   
End If
If a <= c Then
t = a: a = c: c = t
   (3)   
If b <= c Then
t = b: b = c: c = t           
End If
   (4)   = a & "," & b & "," & c
End Sub
2.下列程序功能:将数值序列3,6,9,12,…,99存入数组中,并显示在窗体上(要求每一行上输出3个)。请填写程序空白处使程序完整。
Option Base 1
Dim m(33) As Integer
Private Sub Command1_Click()
Dim n As Integer
m(1) = 3
n = 0
For i = 1 To 33
m( i ) =    (5)    
If    (6)    Then
Print
n = 0
End If
n = n + 1
Print "M(" & i & ")=" & m(i),
   (7)   
End Sub
2.下列程序功能:将数值序列3,6,9,12,…,99存入数组中,并显示在窗体上(要求每一行上输出3个)。请填写程序空白处使程序完整。
Option Base 1
Dim m(33) As Integer
Private Sub Command1_Click()
Dim n As Integer
m(1) = 3
n = 0
For i = 1 To 33
m( i ) =    (5)    
If    (6)    Then
Print
n = 0
End If
n = n + 1
Print "M(" & i & ")=" & m(i),
   (7)   
End Sub
古北幺妹 1年前 已收到1个回答 举报

paopao453 春芽

共回答了16个问题采纳率:87.5% 举报

(1) Val(Text2.Text)
(2) t = a: a = c: c = t
(3) End If
(4) Text4.Text
(5) i * 3
(6) n mod 3 = 0
(7) Next i

1年前

5
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.026 s. - webmaster@yulucn.com