s=a/(1+a+a^2)+b/(1+b+b^2)+c/(1+c+c^2) 用SUB过程写
问题描述:
s=a/(1+a+a^2)+b/(1+b+b^2)+c/(1+c+c^2) 用SUB过程写
答
Sub sum(a,b,c,s)
s = a / (1 + a + a ^ 2) + b / (1 + b + b ^ 2) + c / (1 + c + c ^ 2)
End Sub
Private Sub Command1_Click()
a = 3:b = 4:c = 5
Call sum(a,b,c,s)
MsgBox s
End Sub