早教吧 育儿知识 作业答案 考试题库 百科 知识分享

vb有道题目随机生成100个两位正整数,统计其中小于等于40的数,我的过程如下dima(100)asinteger,iasintegerfori=1to100a(i)=int(rnd*90+10)printa(i);ifimod10=0thenprintifa(i)

题目详情
vb有道题目随机生成100个两位正整数,统计其中小于等于40的数,我的过程如下dim a(100) as integer,i as
integer for i =1 to 100 a(i)=int(rnd*90+10) print a(i);if i mod 10 =0 then print if a(i)
▼优质解答
答案和解析
Dim a(100) As Integer,i As Integer
For i = 1 To 100
a(i) = Int(Rnd * 90 + 10)
Print a(i);
If i Mod 10 = 0 Then Print
If a(i)