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