用VB如何编写1的平方加2的平方加3的平方加到N的平方程序

如题所述

n=Val(inputbox("请输入N"))
For i=1 to n
s=s+i^2
Next
Msgbox "计算结果为" & s
温馨提示:答案为网友推荐,仅供参考