4个回答
展开全部
一楼有问题.
dim a(19) as double
for i=0 to 19
a(i)=inputbox("请输入一个数")
next
dim min1 as double '记录最小值
dim min2 as integer '记录下标
min1=a(0):min2=0 '要赋初值
for i = 1 to 19
if a(i)<min1 then
min1=a(i):min2=i
end if
next
print "最小数是:" & min1 & " 其下标是:" & min2
dim a(19) as double
for i=0 to 19
a(i)=inputbox("请输入一个数")
next
dim min1 as double '记录最小值
dim min2 as integer '记录下标
min1=a(0):min2=0 '要赋初值
for i = 1 to 19
if a(i)<min1 then
min1=a(i):min2=i
end if
next
print "最小数是:" & min1 & " 其下标是:" & min2
展开全部
dim a(19) as double
for i=0 to 19
a(i)=inputbox("输入一个数")
next
dim zuixiaoshu as double
dim zuixiaoshuxiabiao as integer
for i = 0 to 19
if a(i)<zuixiaoshu then
zuixiaoshu=a(i)
zuixiaoshuxiabiao=i
next
print "最小数是:" & zuixiaoshu & " 其下标是:" & zuixiaoshuxiabiao
for i=0 to 19
a(i)=inputbox("输入一个数")
next
dim zuixiaoshu as double
dim zuixiaoshuxiabiao as integer
for i = 0 to 19
if a(i)<zuixiaoshu then
zuixiaoshu=a(i)
zuixiaoshuxiabiao=i
next
print "最小数是:" & zuixiaoshu & " 其下标是:" & zuixiaoshuxiabiao
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Dim a(5) As Single
For i = 0 To 5
a(i) = InputBox("请输入一个数:")
Next i
Dim Min As Single
Dim MinNum As Integer
Min = a(0)
For i = 0 To 5
If a(i) < Min Then
Min = a(i)
MinNum = i
End If
Next i
MsgBox "最小的数是:" & Min & " 下标是:" & MinNum
End Sub
Dim a(5) As Single
For i = 0 To 5
a(i) = InputBox("请输入一个数:")
Next i
Dim Min As Single
Dim MinNum As Integer
Min = a(0)
For i = 0 To 5
If a(i) < Min Then
Min = a(i)
MinNum = i
End If
Next i
MsgBox "最小的数是:" & Min & " 下标是:" & MinNum
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
dim a(1 to 20)
dim min as double
dim xiabiao as integer
private command1_click()
for i=1 to 20
a(i)=val(inputbox("输入一个数"))
next i
min=a(1):xiabiao=1
for i = 2 to 20
if a(i)<min then
min=a(i)
xiabiao=i
next i
print "最小数是:" ;min
print "其下标是:" ;xiabiao
end sub
dim min as double
dim xiabiao as integer
private command1_click()
for i=1 to 20
a(i)=val(inputbox("输入一个数"))
next i
min=a(1):xiabiao=1
for i = 2 to 20
if a(i)<min then
min=a(i)
xiabiao=i
next i
print "最小数是:" ;min
print "其下标是:" ;xiabiao
end sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询