请问该怎么测试,oracle function函数?

怎么测试,oracle function函数


波斯汪
浏览 570回答 5
5回答

慕勒3428872

怎么测试,oracle function函数比如你定义了一个函数:create FUNCTION y2(inx2 number)return number isResult number(2);beginResult := inx2*inx2;return(Result);end y2; 

人到中年有点甜

Private Sub Command1_Click()n = CInt(InputBox("N="))y = fac(n)MsgBox n & "!=" & yEnd SubFunction fac(n)If n = 0 Or n = 1 Then fac = 1 Else fac = n * fac(n - 1)End Function

暮色呼如

Private Sub Command1_Click()  a = CInt(Text1.Text)  b = CInt(Text2.Text)  x = 0  gcd a, b, x  Label1.Caption = "Gcd(" & a & "," & b & ")=" & x  End SubPrivate Sub Form_Load()  Label1.Caption = ""  Text1.Text = ""  Text2.Text = ""End SubSub gcd(a, b, x)  If a Mod b = 0 Then    x = b  Else    gcd b, a Mod b, x  End IfEnd Sub

当年话下

12345678Function Factorial(n As Integer) As DoubleIf Factorial = 0 Then Factorial = 1If n > 1 Then Factorial = n * Factorial(n - 1)End Function Private Sub Form_Click() '点击窗体运行MsgBox "阶乘计算结果为 " & Factorial(Val(InputBox("请输入一个整数,不要太大")))End Sub

心有法竹

Private Function Factorial1(intN As Integer) As IntegerIf intN = 0 ThenFactorial1 = 1ElseFactorial1 = Factorial1(intN - 1) * intNEnd IfEnd Function
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java