程序代码如下所示,请补充完整。
Private Sub Command1_Click()
Dim i As Integer,j As Integer,s As Single,zc As Integer
Dim max As Integer
zc=Val(Text1.Text)
max=0
If zc Mod 2=1 Then
List1.AddItem ”该周长的矩形长度和宽度不是整数!”
Else
List1.AddItem ”宽度 长度 面积”
For i=1 To zc \2
If i>j Then Exit For
List1.AddItem Str(i)+” ”+Str(j)+” ”+Str(s)
If Then max=s
End If
Text2.Text=Str(max)
End Sub