Vb输入三个数,按从小到大的次序显示
xyz的输入可通过InputNox()函数实现.比较大小可通过三个单分支if语句也可通过一个IF语句和一个嵌套IF语句实现谢谢大家了!!!!...
xyz的输入可通过InputNox()函数实现.
比较大小可通过三个单分支if语句
也可通过一个IF语句和一个嵌套IF语句实现
谢谢大家了!!!! 展开
比较大小可通过三个单分支if语句
也可通过一个IF语句和一个嵌套IF语句实现
谢谢大家了!!!! 展开
展开全部
Show
x = 8: y = 12: z = 2
Dim a(1 To 3)
a(1) = x: a(2) = y: a(3) = z
For i = 1 To 2
For j = 1 To 3 - i
If a(j) > a(j + 1) Then
s = a(j)
a(j) = a(j + 1)
a(j + 1) = s
End If
Next j
Next i
For i = 1 To 3
Print a(i)
Next i
x = 8: y = 12: z = 2
Dim a(1 To 3)
a(1) = x: a(2) = y: a(3) = z
For i = 1 To 2
For j = 1 To 3 - i
If a(j) > a(j + 1) Then
s = a(j)
a(j) = a(j + 1)
a(j + 1) = s
End If
Next j
Next i
For i = 1 To 3
Print a(i)
Next i
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询