采用计数循环方式:clearsum=0for i =1 to 30 sum=sum+iendfor?“1加到30的和是:”,sum
s = 0for i = 1 to 30s = s + inext?s