求高手,给出最后输出的答案,关键是答案怎么出来的,过程比结果重要,跪谢 10
OptionExplicitPrivateSubCommand1_Click()DimaAsInteger,bAsInteger,zAsIntegera=1:b=1:z=...
Option Explicit
Private Sub Command1_Click()
Dim a As Integer, b As Integer, z As Integer
a = 1: b = 1: z = 1
Call p1(a, b)
Print a, b, z
Call p1(b, a)
Print a, b, z
End Sub
Private Sub p1(x As Integer, ByVal y As Integer)
Static z As Integer
x = x + z: y = x - z: z = x + y
Print x, y, z
End Sub 展开
Private Sub Command1_Click()
Dim a As Integer, b As Integer, z As Integer
a = 1: b = 1: z = 1
Call p1(a, b)
Print a, b, z
Call p1(b, a)
Print a, b, z
End Sub
Private Sub p1(x As Integer, ByVal y As Integer)
Static z As Integer
x = x + z: y = x - z: z = x + y
Print x, y, z
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询