vb求一个数的平方根
1个回答
展开全部
Private Sub Form_Click()
Dim intFlag As Integer
Dim strNumber As String
Dim strMSG As String
strNumber = InputBox("输入一个数")
msg$ = "输入的数是:" + strNumber + Chr$(13) + Chr(10) + "确认是否正确"
intFlag = MsgBox(msg$, 36)
If intFlag = 6 Then
Print "Sqr("; strNumber; ")="; Sqr(Val(strNumber))
Else
Print "取消操作"
End If
End Sub
Private Sub Form_Load()
AutoRedraw = True
Print "计算一个数的平方根"
Print "单击窗体开始"
End Sub
Dim intFlag As Integer
Dim strNumber As String
Dim strMSG As String
strNumber = InputBox("输入一个数")
msg$ = "输入的数是:" + strNumber + Chr$(13) + Chr(10) + "确认是否正确"
intFlag = MsgBox(msg$, 36)
If intFlag = 6 Then
Print "Sqr("; strNumber; ")="; Sqr(Val(strNumber))
Else
Print "取消操作"
End If
End Sub
Private Sub Form_Load()
AutoRedraw = True
Print "计算一个数的平方根"
Print "单击窗体开始"
End Sub
来自:求助得到的回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询