99问答网
所有问题
vb编程题编程计算; s=1*2*3+4*5*6+7*8*9+......+28*29*30;。请您书写相应代码?
如题所述
举报该问题
其他回答
第1个回答 2012-04-30
Dim s, s1
Dim a(2)
For i=1 to 10
for j=0 to 2
a(j)=j+(i-1)*3+1
Next j
s1=a(0)*a(1)*a(2)
s=s+s1
Next i
本回答被网友采纳
第2个回答 2012-04-30
这道题不是考的编程,是在考寄存器应用和数值计算方法。
一般 的编程方法是做不出来的
相似回答
求
s=1*2*3
*
4*5*6
*
7*8*9*
10的程序
vb
程序
答:
dim s as integer
s=1*2*3*4*5*6
*
7*8*9*
10print s
vb
求
1*2*3
*
4*5*6
*
7*8*9*
10
答:
Private Sub Form_Load()Dim i As Integer Dim j As Integer Dim strtemp As String For i = 1 To 9 strtemp = ""For j = 1 To 9 If j > i Then GoTo iii:strtemp = strtemp & i & "*" & j & "=" & i * j & " "Next j iii:Debug.Print strtemp Next i End Sub ...
1*2*3
*
4*5*6
*
7*8*9*
10=多少的简便算法
答:
1*2*3
*
4*5*6
*
7*8*9*
10=10!,直接利用计算机计算10的阶乘。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 =3628800 利用vb程序计算:dim s as singledim i a...
VB
作业题,
编写程序
,求
s=1*2*3*
…*n的值。其中n值从键盘上输入,在窗体...
答:
Private Sub Form_Click()Dim a As Integer, i As Integer, s As Long
s = 1
a = InputBox("请输入一个数", "提示", "5")For i = 1 To a s = s * i If i = a Then Print Str(i) + "=" + Str(s)Else Print Str(i) + "*";End If Next End Sub ...
vb计算1*2*3+
2*3
*4+
...+6
*7*8
答:
Dim a,b,c,da=1,b=2,c=3,d=0For a=1 to 6d=d+a*b*cb=b+1c=c+1next aprint d应该这样就可以了吧-.-手打未验证...
设计
一
个
VB
程序:"
1*2
+
2*3+
3*4
+4*5
+
5*6+
...N(N+1)
答:
'窗体放一个CommandButton、两个TextBox '在Text1输入N Private Sub Command1_Click()Dim i As Integer, j As Long For i = 1 To CInt(Text1.Text)j = j + i * (i + 1)Next i Text2.Text = j End Sub
用
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
跪求:在
VB
中编写一个程序 求
S=1*2
+
2*3+
3*4
+4*5+
...+n*(n+1)最后显示...
答:
s --- 2. for i=1 to 5 for j=1 to i print i*j;next print next --- 3.
s=1
for i=2 to 10 s=s+2^i next label1.caption=s
vb编程s=1+
1×
2+
1×2×
3+
1×2×3×4……1×2×3×
4
×
5
×6×7×8×9...
答:
Private Sub Command1_Click()Dim S1 As Long Dim SS As Long For i = 1 To 10 S1 = 1 For j = i To 1 Step -1 S1 = S1 * j Next j S
S =
SS
+
S1 Next i End Sub
大家正在搜
相关问题
vb题,编程计算1*2*3+2*3*4+3*4*5+…6*7...
vb软件编程s=1-2+3-4+5-6+7-8+9
VB编程:S=1!+2!+3!+4!+5!+6!+7!+8!...
VB程序:求S=1!+2!+3!+4!+5!+6!+7!+8...
VB程序设计求1+1*2+1*2*3+1*2*3*4.......
跪求:在VB中编写一个程序 求S=1*2+2*3+3*4+4...
VB编程s=1!+2!+3!+4!+5!+6!+7!+8!+...
vb编程s=1+1×2+1×2×3+1×2×3×4……1×2...