int i,n,sum=0;printf("输入n:");scanf("%d",&n);for(i=0;i<n;i++)sum+=(i+1)*(i+1)*(i+1);printf("1的立方一直加到%d的立方和为%d\n",n,sum);}