VB,求详细解答过程求N A B答案是10 27 9不知怎么的出来的,别让我自己按F8,考试不可能把计算机带过去
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/07/13 17:05:14
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
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