提高混凝土抗冻性措施:VB编程的请进

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 15:06:41
1/2+2/3+3/4+......+99/100的和.的程序怎么写速回!!! 先谢谢了.

哈哈`让我来`
dim H,NUMB,NUMA,aNUM,bNUM,a1,a2,b1,b2
NUMB=int(0)
NUMA=int(50)
for h= 1 to NUMA
a1=int(1)
a2=int(2)
b1=int(2)
b2=int(3)
aNUM=a1/a2
bNUM=b1/b2
a1=a1+1
a2=a2+1
b1=b1+1
b2=b2+1
NUMB=NUMB+aNUM+bNUM
next

dim i,s
i=0
s=0
while i<=100
i=i+1
s = s+i
wend

求1/2+2/3+3/4+......+99/100的和

程序
dim sum as single
for x=1 to 99 step=1
sum=sum+(x)/(1+x)
next x
print "sum=";sum