电信电话宽带初始密码:急!VB高手帮帮忙!

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/08 12:25:08
编程题:“从20个整型数据中找出最大值并输出”
我可以说是VB白痴,如果可以,请大虾们尽可能详完整点编,细点说明吧! 谢谢

dim a(1 to 20) as integer
dim temp as integer
for i=1 to 20
a(i)=inputbox("请输入第" & i & "个数");
next '随便给这20个数副值
for i=1 to 20 ‘然后用循环判断
if a(i)>temp then ’如果比temp大就副给temp,那么temp肯定是最大的
temp=a(i)
end if
next i

msgbox temp ’对话框弹出结果