VB,求详细解答过程求N A B答案是10 27 9不知怎么的出来的,别让我自己按F8,考试不可能把计算机带过去
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/07/31 01:56:34
VB,求详细解答过程求N A B答案是10 27 9不知怎么的出来的,别让我自己按F8,考试不可能把计算机带过去
option explict dim n as integer private sub command1_click() dim a as integer,b as integer a=2b=3 for n=1 to 6 if n mod 2=0 then b=fun(n,a)+a else a=fun(b,n)+b end if next n print n,a,b end sub private function fun(x as integer,y as integer)as integer x=y-1+n y=x+y-n fun=x+y end function
option explict dim n as integer private sub command1_click() dim a as integer,b as integer a=2b=3 for n=1 to 6 if n mod 2=0 then b=fun(n,a)+a else a=fun(b,n)+b end if next n print n,a,b end sub private function fun(x as integer,y as integer)as integer x=y-1+n y=x+y-n fun=x+y end function
![VB,求详细解答过程求N A B答案是10 27 9不知怎么的出来的,别让我自己按F8,考试不可能把计算机带过去](/uploads/image/z/1424071-55-1.jpg?t=VB%2C%E6%B1%82%E8%AF%A6%E7%BB%86%E8%A7%A3%E7%AD%94%E8%BF%87%E7%A8%8B%E6%B1%82N+A+B%E7%AD%94%E6%A1%88%E6%98%AF10+27+9%E4%B8%8D%E7%9F%A5%E6%80%8E%E4%B9%88%E7%9A%84%E5%87%BA%E6%9D%A5%E7%9A%84%2C%E5%88%AB%E8%AE%A9%E6%88%91%E8%87%AA%E5%B7%B1%E6%8C%89F8%2C%E8%80%83%E8%AF%95%E4%B8%8D%E5%8F%AF%E8%83%BD%E6%8A%8A%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%B8%A6%E8%BF%87%E5%8E%BB)
Dim n As Integer
Private Sub command1_click()
Dim a As Integer, b As Integer
a = 2
b = 3
For n = 1 To 6
If n Mod 2 = 0 Then '当 n为 2 4 6
n = a - 1 + n
b = n + a * 2
Else ' 1 3
b = 2 * n - 1
n = b
a = 2 * b + n
End If
Next n
Print n, a, b
End Sub
额 什么怎么来的?
再问: If n Mod 2 = 0 Then '当 n为 2 4 6 n = a - 1 + n b = n + a * 2 这个b的表达式怎么得到的,没看到有*这个符号啊
再答: 你把函数分开来啊,函数就是为了少写些代码
再问: 帮帮忙啊,详细点把。
Private Sub command1_click()
Dim a As Integer, b As Integer
a = 2
b = 3
For n = 1 To 6
If n Mod 2 = 0 Then '当 n为 2 4 6
n = a - 1 + n
b = n + a * 2
Else ' 1 3
b = 2 * n - 1
n = b
a = 2 * b + n
End If
Next n
Print n, a, b
End Sub
额 什么怎么来的?
再问: If n Mod 2 = 0 Then '当 n为 2 4 6 n = a - 1 + n b = n + a * 2 这个b的表达式怎么得到的,没看到有*这个符号啊
再答: 你把函数分开来啊,函数就是为了少写些代码
再问: 帮帮忙啊,详细点把。
VB,求详细解答过程求N A B答案是10 27 9不知怎么的出来的,别让我自己按F8,考试不可能把计算机带过去
求详细解释分析解答标准过程谢谢!答案选B 求详解 遗传题的详细解答 我怎么选的是D呢 一定要带方法的 谢谢!
求高手解答vb中4+10\6*7/8mod9式子的详细解答过程
VB a=Sqr(3):b=Sqr(2):c=a>b:Print c 求详细解答过程
以上是我的过程 我选的是B 正确答案是A 求我哪一步有问题 求详细解释分析解答标准过程 谢谢!
有答案、不知过程怎么算的、求详细过程,、
Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As In
求此道大题的详细解答过程、一定要非常详细.别废话直接上过程!.,
求此道大题的详细解答过程、一定要非常详细.别废话直接上过程!
求此道大题的详细解答过程、一定要非常详细.别废话直接上过程!m
会采纳要详细过程别跟我说y=kx+b然后叫我自己求第四题
求计算机vb中的题:编写程序,求S=A!+B!+C!,阶乘的计算分别用sub过程和functi