编写一个求X的n次方的函数

问题描述:

编写一个求X的n次方的函数

Private Function S(ByVal x As Integer,ByVal n As Integer) As Long
S = x ^ n
Print S
End Function
Private Sub Command1_Click()
x = 6
n = 5
Call S(x,n)
End Sub