Quick Basic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1/100 用FOR语句 急!

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 16:43:49
QuickBasic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1/100用FOR语句急!QuickBasic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1

Quick Basic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1/100 用FOR语句 急!
Quick Basic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1/100 用FOR语句 急!

Quick Basic怎样才能弄1/1+1/2+1/3+1/4+1/5+……+1/99+1/100 用FOR语句 急!
CLS
FOR i = 1 TO 100
sum = 1 / i + sum
NEXT i
PRINT "sum="; sum
END

CLS
FOR i = 1 TO 100
sum = 1 / i + s
NEXT i
PRINT "s="; s
END