vb如何编写完整代码:分别在text1和text2中输入两个不为零的整数a和b,求a和b和的平方,text3=c
1个回答
展开全部
Private Sub Text1_Change()
AAA
End Sub
Sub AAA()
Dim A As Integer, B As Integer
A = Val(Text1.Text)
B = Val(Text2.Text)
If A <> 0 And B <> 0 Then
C = (A + B) ^ 2
Text3.Text = C
Else
Text3.Text = ""
End If
End Sub
Private Sub Text2_Change()
AAA
End Sub
AAA
End Sub
Sub AAA()
Dim A As Integer, B As Integer
A = Val(Text1.Text)
B = Val(Text2.Text)
If A <> 0 And B <> 0 Then
C = (A + B) ^ 2
Text3.Text = C
Else
Text3.Text = ""
End If
End Sub
Private Sub Text2_Change()
AAA
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询