找考题网-背景图
单项选择题

下面程序是计算1+2+3+……+n值,此程序处划线处应填:Dim sum as long,I as integ……

下面程序是计算1+2+3+……+n值,此程序处划线处应填: Dim sum as long,I as integer,n as integer Sum=0 n=val(inputbox(“输入n的值”)) For i=1 to n ______ Next Iprint sum

A.sum=sum+i
B.n=n+i
C.sum=sum+1
D.n=n+1