比较大小的问题,分来了! 有5个整型的变量a、b、c、d、e怎么把最大的取出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 课本上应该有啊 思路先设个临时变量x,a和b比最大的赋值给x再和c比依次论推 dim lMax as longlmax=aif b>lmax then lmax=bif c>lmax then lmax=cif d>lmax then lmax=dif e>lmax then lmax=eprint lmax Private Sub Command1_Click() Dim aInt(4) As Integer Dim intTemp As Integer Dim intI As Integer intTemp = 0 aInt(0) = 0 aInt(1) = 1 aInt(2) = 2 aInt(3) = 3 For intI = 0 To UBound(aInt) If intTemp < aInt(intI) Then intTemp = aInt(intI) End If Next MsgBox "数组中最大值为" & intTempEnd Sub 周章 icecanal() 这种问题确实还是让他自己写好免得养成依赖心理 MSHFlexGrid显示滚动条的问题~ 如何获取鼠标拖放控件后,控件的坐标和长宽? 请教各位达人 如何在vb中动态创建ODBC 如何把一个字符串,写入一个指定的文件啊?谢谢了,急 如何在MsChart图表曲线上,将数显示出来?? 怎么样知道一个数据表里面的日期最早的记录? 软件下载:终于完成 毕业设计,需要下载的请进来 8位码难题 如何用VB实现读取光盘的指定地址的簇、扇区? 我的VB6.0中没有万年历控件(DTpicker),不知原因? 简单的查询问题
dim lMax as long
lmax=a
if b>lmax then lmax=b
if c>lmax then lmax=c
if d>lmax then lmax=d
if e>lmax then lmax=e
print lmax
Dim aInt(4) As Integer
Dim intTemp As Integer
Dim intI As Integer
intTemp = 0
aInt(0) = 0
aInt(1) = 1
aInt(2) = 2
aInt(3) = 3
For intI = 0 To UBound(aInt)
If intTemp < aInt(intI) Then
intTemp = aInt(intI)
End If
Next
MsgBox "数组中最大值为" & intTemp
End Sub
这种问题确实还是让他自己写好
免得养成依赖心理