#include<iostream> using namespace std; int QiuHe(int); int main() { int n; int sum=0; cout<<"please input an number : "<<endl; cin>>n; for(int i=1;i<=n;i++) { sum+=QiuHe(i); } cout<<"the mount of the series is : "<<sum<<endl; return 0; } int QiuHe(int index) { int sum1=0; for(int j=1;j<=index;j++) { sum1+=j; } return sum1; }