VB超新手问题,会的请进!
Private Sub Form_Click()
r = InputBox("请输入圆的半径&", "输入圆半径")
pi = 3.14
s = pi * r * r
Print "圆的半径为&" & r&; "厘米"
Print "圆的面积为&" & s&; "平方厘米"
Circle (3000, 3000), r
End Sub
请问第一行Private Sub Form_Click()应该怎么写?
参考答案:Private Sub Form_Click()
Dim s As Single
r = InputBox("请输入圆的半径", "输入圆半径")
pi = 3.14
s = pi * r * r
Print "圆的半径为" & r & "厘米"
Print "圆的面积为" & s & "平方厘米"
Circle (3000, 3000), r
End Sub