vb 已知SUM=1*2+3+4*6...+n*(n+1)其中n为1到85之间,求从20项到85之间多少数被2,3整除 (最后答案)

如题所述

SUM=1*2+3+4*6...+n*(n+1) 你是不是打错了? 从这个表达式,看不出什么规律啊
等你补充问题后,我再回答
温馨提示:内容为网友见解,仅供参考
无其他回答

vb 已知SUM=1*2+3+4*6...+n*(n+1)其中n为1到85之间,求从20项到85之间...
SUM=1*2+3+4*6...+n*(n+1) 你是不是打错了? 从这个表达式,看不出什么规律啊 等你补充问题后,我再回答

VB编程s=1\/(1*2)+1\/(2*3)+1\/(3*4)+...+1\/n*(n+1) 要求:N自己确定。
For n = 1 To n s = s + 1 \/ (n * (n + 1))Next n MsgBox s End Sub

各位高手求VB代码两题 1,S=1+1\/2+1\/3+1\/4...1\/n当某项<=10的-7次方...
n = n + 1 Loop Print s 第2题:设label1的AutoSize为真 Dim i As Integer, x As Integer Randomize Label1.Caption = ""For i = 1 To 20 x = Rnd * 78 + 18 Label1.Caption = Label1.Caption & x & Space(6)Next

编程计算1-2+3-4+5-6+。。。+n的值,其中n由文本框输入(用vb编写谢谢...
For i = 1 To n If i Mod 2 = 1 Then Sum = Sum + i Else Sum = Sum - i Next i

计算“1*2+2*3+3*4+···+n*(n+1)”的VB编程
Sn =(1²+2²+3²+4²+,,,+n²)+(1+2+3+4+,,,+n)=[n(n+1)(2n+1)\/6]+[n(n+1)\/2]=[n(n+1)\/6]×{(2n+1)+3]=n(n+1)(n+2)\/3

用VB编程计算1-2+3-4+5-6…±n的值,n由文本框输入
个人认为有点小问题,修改如下:Private Sub Form_Click()Dim n As Integer Dim sum As Integer sum = 0 n = Val(InputBox("输入一个整数:"))sum = 0 For i = 1 To n '此处修改 sum = sum + (-1) ^ (i + 1) * i '此处修改 Next i Print sum End Sub ...

vb编程 已知sum=1!-2!+3!-4!...-10!,请将sum值输出到窗体上 用do while...
Private Sub Form_Load()Dim i As Integer, n As Long Dim k As Long i = 1: n = 1 Do While i <= 10 n = n * i k = k + (-1) ^ (i - 1) * n i = i + 1 Loop Print k End Sub 结果:-3301819

如何用vb编写1-2+3-4+5……+(-1)^(n+1)n的值n由自己指定
你不妨用一个函数吧 private function sum_dou(n as integer) as double dim sum as double dim i as integer sum=0 for i=1 to n sum=sum+sum*(-1)^(i+1)next i sum_dou=sum end function 直接用文本格式编写的,可能会有一些拼写错误,你自己稍微改一下,应该没有问题 ...

求vb题代码:求任意个数的阶乘累计和。s=1!+2!+3!+...+n!,n由用户...
If n < 1 Then '判断是否小于1 ,如果小于1就调用已经定义好的过程弹出对话框 Call msg Exit Sub End If For n = 1 To n '求1!到n!阶乘循环n次 sum = sum + func(n) '调用求第n数的的阶乘的函数,计算前1!+n!的和 Next n MsgBox "1!+2!+3!+...+n!为" & sum, ...

用VB编程算1*2*3*...*n
Private Sub Command1_Click() Dim s As Double, n As Integer, i As Integer s = 1 n = InputBox("请输入数据") For i = 1 To n s = s * i Next i Print sEnd Sub

相似回答