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怎么不对呢?
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 05:59:44
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编程:求a=1+3+5+.+(2n-1)的值
Private Sub Form_click()
Dim a As Integer
Dim i As Integer
Dim n As Integer
n = InputBox("n=")
For i = 1 To n
a = a + 2 * n - 1
Next i
Print "n="; n, "a="; a
End Sub
怎么不对呢?
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怎么不对呢?
for 循环修改下
for i=1 to 2n-1 step 2
a=a+i
next i
vb编程实现求sum=1/1!+1/2!+1/3!+ +1/n! (n
vb编程求和sum=1!+3!+5!+.+(2n-1)!
用VB编程 求1+2+3+……+n,n由键盘输入
vb编程 用递归函数求数列1,1,2,3,5,8,13,21.的第N项RT
求编程高手,用VB计算出n!+(n+1)!+(n+2)!+...+(n+m)!
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编程n!+(n+1)!+(n+2)!+(n+3)!+……+(n+m)!要有控件
VB题 编程求S=1²+2²+3²+.+N²(其中N的值要求用键盘输入)
VB编程~求s=1!+2!+3!+4!+……+10!
vb编程.会的来.感激不尽~vb 【循环结构】编程计算【s=1+2+3++100的值】
VB编程用For循环语句VB:用输入框输入一个数n,若此数是大于0的正整数则求S=1-2/3+4/5-…2n/2n+1,否则重输数据,直到数据合理为止.
求编程,由键盘输入N,编程求M=N!其中N=1*2*3*..N
求VB编程代码(For循环).题目:求Fibonacci数列:1,1,2,3,5,8,…的前40个数即:F1=1 (n=1), F2=l (n=2),Fn=F(n-l) F(n-2) (n>=3)谢谢
用VB编程求1/2+2/3+3/4+4/5…… 前50项之和.(用for语句编程)
vb编程 用牛顿迭代法求f(x)=3x^3-4x^2-5x+13
VB编程题:实现求sum=1!➕3!➕5!➕……➕25!
vb高手来,补充程序3、编程求方程5X+4Y=2,在|X|
vb编程求下列矩阵主对角线上的元素之和.1 2 3 4 5 6 7 8 9