展开全部
dim i ,sum ,add(9)
for i = 0 to 9
add(i)=inputbox("请输入")
sum=sum+add( i)
next
print sum
for i = 0 to 9
add(i)=inputbox("请输入")
sum=sum+add( i)
next
print sum
追问
能不能用DO WHILE 语句写。。
追答
Dim i As Integer, sum As Integer, add(9) As Integer
Do While i <= 8
add(i) = InputBox("请输入")
sum = sum + add(i)
i = i + 1
Loop
Print sum
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询