高校等考试题天天练二级VB]10月22日
知识点:for语句和if语句嵌套 Private Sub Command1_Click() Dim a As Variant a = Array(4, 2, 3, 1, 5) For m = 4 To 0 Step -1 For n = 1 To m If a(m) < a(m - n) Then t = a(m) a(m) = a(m - n) a(m - n) = t End If Next n Next m For m = 0 To 4 Print a(m); Next m End Sub 相关资料 |