mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
15 lines
233 B
C++
15 lines
233 B
C++
#include <iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int n,sum;
|
|
while(cin>>n)
|
|
{
|
|
sum = 0;
|
|
for(int i = 1;i <= n;++i)
|
|
sum += i;
|
|
cout<<sum<<endl<<endl;
|
|
}
|
|
return 0;
|
|
}
|