用vb6.0做求圆的周长和面积的程序代码

明天交作业 十分火急 谢谢啦

第1个回答  推荐于2016-02-28
Private Sub Command1_Click()
Const PI = 3.1415926
Dim R As Integer, Area As Double, Perimeter As Double
R = Val(Text1.Text) ’不是Test1.Test
Area = PI * R * R
Perimeter = 2 * PI * R
Label1.Caption = R & " - --" & Area & " - --" & Perimeter
'或者 Label1.Caption = Cstr(R) & " - --" & Cstr(Area) & " - --" & Cstr(Perimeter)
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Label1.Caption = ""
End Sub

Private Sub Command3_Click()
End
End Sub这里面还有就是求直径。本回答被网友采纳

用vb6.0做求圆的周长和面积的程序代码
Private Sub Command1_Click()Const PI = 3.1415926 Dim R As Integer, Area As Double, Perimeter As Double R = Val(Text1.Text) ’不是Test1.Test Area = PI * R * R Perimeter = 2 * PI * R Label1.Caption = R & " - --" & Area & " - --" & Perimeter '或者 Label...

相似回答