0402 Private Sub Command1_Click() Dim a As Single,b As Single Dim c As Single,d As Single Dim m A

0402 Private Sub Command1_Click() Dim a As Single,b As Single Dim c As Single,d As Single Dim m A

题目
0402 Private Sub Command1_Click() Dim a As Single,b As Single Dim c As Single,d As Single Dim m A
0401
Private Sub Form_Load()
Dim x As Long,s As String
x = InputBox("输入一个整数(1~40000)")
If x Mod 2 = 0 Then
s = "偶数"
Else
s = "奇数"
End If
MsgBox s
End Sub
Private Sub Command1_Click()
Dim a As Single,b As Single
Dim c As Single,d As Single
Dim m As Single,n As Single,x As Single
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
d = Val(Text4.Text)
If a > b Then
m = a
Else
m = b
End If
If c > d Then
n = c
Else
n = d
End If
If m > n Then
x = m
Else
x = n
End If
Text5.Text = x
End Sub
答案
你好像是查询abcd四个数的最大数,你使用的这个方法不理想,在VB中一般使用排序进行判断,排序是将数据存储在数组中,你的程序可以定义一个数组,然后进行排序:Private Sub Command1_Click()Dim a(1 To 4) As Single,x A...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.