qhnw.net
当前位置:首页 >> vB求1*2*3*4*5*6*7*8*9*10 >>

vB求1*2*3*4*5*6*7*8*9*10

a = Val(InputBox("请输入个数"))Sum = 1If a <> 0 ThenFor i = 1 To aSum = Sum * iNext iPrint "从1垒乘到" & a & " 的积为" & SumEnd If

dim i,j=1,s=0 for i=1 to 10 j=j*i s=s+j next print s具体自己再看看,就是这个思想,很简答的,

void main() { int i,a=0; for (i=1;i a=a+i*(i+1)*(i+2); printf("%d\n",a); }

Dim i,j,k k = 1 For i = 1 To 10 k=k * i For j = 1 To i '这里是i! k=k * j next j next i 不知道是不是你要的

写出通项公式J = (1/1) * (2/3) * (3/5)* (4/7)* (5/9) * (6/11) * * (n/(2n-1))本题的通项公式就是: (n/(2n-1))dim J as singledim i as integerdim n as integern = Val(InputBox("输入项数n:"))J = 1for i = 1 to n j = j * i / (2*i - 1)next iPrint J

第1题 s=0 for i=1 to 28 step 3 s=s+i*(i+1)*(i+2) next i print s 第2题 s=0 for i=1 to 13 step 3 s=s+i*(i+1)*(i+2)*8 next i print s

1*2*3*4*5*6*7*8*9*10的简便算法:1. 1*2*3*4*5*6*7*8*9*10=10!,直接利用计算机计算10的阶乘.2. 1*2*3*4*5*6*7*8*9*10=1*2*3*2*2*5*2*3*7*2*2*2*3*3*2*5=2^8*3^4*5^2*7=2^6*3^4*2^2*5^2*7=64*81*100*7=36288003. 利用vb程序计算:dim s as singledim i as integers = 1for i = 1 to 10 s = s * inext iprint s

int i=1,a=1; for(i=1;i<=10;i++) a*=i; printf("%d",a);

1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9= ( 2 X 3 X 4 X 5 ) X ( 6 X 7 X 8 X 9 )= ( 10 X 12 ) X ( 54 X 56 )= 120 X ( 55 - 1 )( 55 + 1 )= 120 X ( 55" - 1" )= 30 X 4 X ( 3025 - 1 )= 30 X ( 12100 - 4 )= 363000 -

1*2*3*4*5*6*7*8*9*10的简便算法:1. 1*2*3*4*5*6*7*8*9*10=10!,直接利用计算机计算10的阶乘.2. 1*2*3*4*5*6*7*8*9*10=1*2*3*2*2*5*2*3*7*2*2*2*3*3*2*5=2^8*3^4*5^2*7=2^6*3^4*2^2*5^2*7=64*81*100*7=36288003. 利用vb程序计算:dim s as single dim i as integer s = 1 for i = 1 to 10 s = s * i next i print s

相关文档
网站首页 | 网站地图
All rights reserved Powered by www.qhnw.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com