Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As Integer,c As Integer,d As Singlea = 1b = 1c = 0d = 0Do While Abs(b / a) > 0.000001d = d + b / ac = c + 1a = a * cb = -bLoopPrint dEnd Sub

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 06:58:56
Vb求N的阶层我自己做的,PrivateSubForm_Click()DimaAsSingle,bAsInteger,cAsInteger,dAsSinglea=1b=1c=0d=0DoWhileAb

Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As Integer,c As Integer,d As Singlea = 1b = 1c = 0d = 0Do While Abs(b / a) > 0.000001d = d + b / ac = c + 1a = a * cb = -bLoopPrint dEnd Sub
Vb求N的阶层
我自己做的,
Private Sub Form_Click()
Dim a As Single,b As Integer,c As Integer,d As Single
a = 1
b = 1
c = 0
d = 0
Do While Abs(b / a) > 0.000001
d = d + b / a
c = c + 1
a = a * c
b = -b
Loop
Print d
End Sub

Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As Integer,c As Integer,d As Singlea = 1b = 1c = 0d = 0Do While Abs(b / a) > 0.000001d = d + b / ac = c + 1a = a * cb = -bLoopPrint dEnd Sub
Do While Abs(b / a) > 0.000001 这条语句应该就不是对的.
而且.你这个题出的也不全.没有给出n.如果这样.你应该自己生成一个.
然后.就不是Do While Abs(b / a) > 0.000001
应该是do while c

Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As Integer,c As Integer,d As Singlea = 1b = 1c = 0d = 0Do While Abs(b / a) > 0.000001d = d + b / ac = c + 1a = a * cb = -bLoopPrint dEnd Sub 怎么用VB计算N的阶层 vb求n的阶乘n 一道关于VB的题!计算1的阶乘分之一 加 2的阶乘分之一 加 3的阶乘分之一 加 4的阶乘分之一下面是我自己编的代码 Private Sub Command1_Click()n = 1s = 1Do While n < 5For i = 1 To ns = s * iNext im = m + 1 / sn = n + VB里的“Private Sub Command1_Click()”是什么意思?那个横, VB 求1000以内素数的和 这个哪里错了 不能用for语句Private Sub Command1_Click() n = 0 '0-1000的一个数 s = 0 '素数和 i = 1 '求余变量 Do While n VB 求10000-99999之间的全部回文式素数我写的程序如下,始终显示ByRef的参数类型错误,Private Function fact(n%) As BooleanDim s%fact = TrueFor s = 2 To n - 1If n Mod i = 0 Thenfact = FalseExit ForEnd IfNext iEnd FunctionPrivate VB 求10000-99999之间的全部回文式素数我写的程序如下,始终显示ByRef的参数类型错误,Private Function fact(n%) As BooleanDim s%fact = TrueFor s = 2 To n - 1If n Mod i = 0 Thenfact = FalseExit ForEnd IfNext iEnd FunctionPrivate 但是VC比VB功能多吧 他俩是完全两立的还是VC能做VB做的软件 也能做自己的软件呢 还是VC 做VC的 VB 做VB的啊 我不学VB能学会VC吗VB能做的VC能做吗 vb的问题,求一个算法!每个字母改为它后面的第N个字母.我大概写了下,这看来好像没有问题,但是当输入最后三个字母后(包括大写),x,y,z 就有问题了.Private Sub Command1_Click()n$ = Text1.TextFor i = 1 T 一道关于VB的题目如何用VB判奇偶我这个代码为什么不行为什么什么数都是偶数?Private Sub Command1_Click()a = Val(Text1.Text)If Int(n / 2) = n / 2 Thenb = 这个数是偶数ElseIf Int(n / 1) = n / 1 Thenb = 这个数是 vb编程:求a=1+3+5+.+(2n-1)的值Private Sub Form_click()Dim a As IntegerDim i As IntegerDim n As Integern = InputBox(n=)For i = 1 To n a = a + 2 * n - 1Next iPrint n=; n, a=; aEnd Sub怎么不对呢? vb循环语句中sqr(n)是什么意思for i=2 to sqr(n) 中sqr(n)代表什么意思?我只能肯定不是开根号的意思!Private Sub Form_Click()Dim n As Integern = InputBox(请输入一个正整数(>=3))k = 0For i = 2 To Sqr(n)If n Mod i = 0 Th 士是什么阶层的? 儒家思想代表的阶层 求Fibonacci数列的第n项的VB程序 用VB编程求Fibonacci数列的第n项 vb:求两自然数m,n的最小公倍数?