下面是求最大公约数的函数的首部
Function gcd(ByVal x As Integer, ByVal y As Integer) As Integer
若要输出8、12、16这3个数的最大公约数,下面正确的语句是
Function gcd(ByVal x As Integer, ByVal y As Integer) As Integer
若要输出8、12、16这3个数的最大公约数,下面正确的语句是
举一反三
- 下面是求最大公约数的函数gcd的首部 Function gcd(ByVal x As Integer, ByVal y As Integer) As Integer 若要输出8、12、16这3个数的最大公约数,下列语句中正确的是 A: Print gcd (8,12), gcd(12,6), gcd(16,8) B: Print gcd (8,12,16) C: Print gcd (8), gcd(12), gcd(16) D: Print gcd (8, gcd(12,16))
- 有过程定义如下:Private Function fun(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer), 则下列调用语句正确的是
- Sub s1(ByVal x As Integer, ByVal y As Integer) Dim t As Integer t = x: x = y: y = t End Sub Sub s2(x As Integer, y As Integer) Dim t As Integer t = x: x = y: y = t End Sub 则以下说法中正确的是( )。
- 下面子过程语句说明合法的是______。 A: Sub f1(ByVal n() As Integer) B: Sub f1(n() As Integer)As Integer C: Function f1(f1 As Integer) As Integer D: Finction f1(ByVal n As Integer)
- 下面的语句中,_________是正确的函数过程头定义。 A: Dim F1 As Function B: Dim F1 As Function(ByVal n%) C: Function F1(ByVal n%) As Integer D: Function F1 As Integer E: Function F1(ByVa F1!) As Integer