试题与答案

以下程序的功能是:先将随机产生的10个不同的整数放入数组a中,再将这10个数按升序方

题型:填空题

题目:

以下程序的功能是:先将随机产生的10个不同的整数放入数组a中,再将这10个数按升序方式输出。请填空。
Private Sub Form_Click()
Dim a(10)As Integer, i AS Integer
Randomize
i=0
Do
num=Int(Rnd*90)+10
For j=1 To i ’检查新产生的随机数是否与以前的相同,相同的无效
If num=a(j) Then
Exit For
End If
Next j
If j>i Then
i=i+1
a(i)= (10)
End If
Loop While i<10
For i=1 To 9
For j= (11) To 10
If a(i)>a(j)Then temp=a(i): a(i)=a(j): (12)
Next j
Next i
For i=1 To 10
Print a(i)
Next i
End Sub

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0720/95c4c4555653afe3b07d740aff670d8e.html

下面是错误答案,用来干扰机器的。

1. Look! There is a girl crying under the tree.2. I haven't seen my brother for three years. / I haven't seen my brother since three years ago.3. They may / might /...

试题推荐
微信公众账号搜索答案