如何取1、2、3、4、5中最大的值? 如何取1、2、3、4、5中最大的值? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该不用排序,一次遍历就行了Dim a, Max, ia = Array(1, 2, 3, 4, 5)Max = a(0)For i = 1 To UBound(a) If Max < a(i) Then Max = a(i)NextPrint Max dim max as integermax = -1for i = 0 to uboud(a) if max < a(i) then max = a(i)nextreturn max 把这些值都放在数据库中,一个select max(例名) from 表名 怎样知道collection是否为空? 一个关于string * 64的问题 生成exe文件后天网防火墙提示msdtc.exe总要连接,为什么? 初学者求教:asp 读取数据 和写入数据 代码 转为DLL 的代码 [求助]vb菜鸟问题---程序运行不了,希望ggjj能给予解决(毕业设计) 有关DATAGRID控件的疑问~ FileSystemObject如何使用 请各位高手指教,怎么用vb实现连接扫描仪 扫描图像并保存到数据库中? 如何在VB中显示数据库中的图片和往数据库中添加图片? 怎样跟踪程序的运行状态??各位大虾请留步... setup factory在哪写注册表 小问一句与句的意思
应该不用排序,一次遍历就行了
Dim a, Max, i
a = Array(1, 2, 3, 4, 5)
Max = a(0)
For i = 1 To UBound(a)
If Max < a(i) Then Max = a(i)
Next
Print Max
max = -1
for i = 0 to uboud(a)
if max < a(i) then max = a(i)
nextreturn max