Răspuns :
#include <iostream>
using namespace std;
int main()
{unsigned int n,i,S;
cin>>n;
S=n*(n+1)/2;
cout<<"Suma 1+2+3+...+"<<n<<" este "<<S<<endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{unsigned int n,i,S;
cin>>n;
S=n*(n+1)/2;
cout<<"Suma 1+2+3+...+"<<n<<" este "<<S<<endl;
return 0;
}