下面的程序错在哪里啊?
//下面的程序错在哪里啊?void Sum(){ int i,j,n,sum=0,s; cout<<"输入n="; cin>>n; for(i=1;i<n+1;i++) { s=0.0; for(j=1;j<=i;j++) s+=j; sum+=s; } cout<<"s=1+(1+2)+(1+2+3)+…+(1+2+3+…+n)="<<sum<<endl;}#include <iostream.h> void main(){ Sum();}