VB编程题:输出任意10个数种最大的数

[复制链接]
查看11 | 回复3 | 2009-5-14 22:04:57 | 显示全部楼层 |阅读模式
Private Sub Command1_Click()ClsRandomizeDim a(11) For i = 1 To 10
a(i) = Int(Rnd * 100000)Next iFor i = 1 To 10Print a(i)If a(i) > Max ThenMax = a(i)End IfNext iPrint "*******"Print "Max=" & MaxEnd Sub...
回复

使用道具 举报

千问 | 2009-5-14 22:04:57 | 显示全部楼层
privatesubform_click()dima%(9),mysingle%,mydouble%mysingle=0:mydouble=0fori=0to9a(i)=inputbox("请输入第"&i+1&"小于三万的正整数")nextfo...
回复

使用道具 举报

千问 | 2009-5-14 22:04:57 | 显示全部楼层
a(9) 为存10个数的数组,max为最大数for i=0 to 9if max<a(i) then
max=a(i)end ifnext itext1.text=max...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行