OJ-Problems-Source/HDOJ/1001_autoAC.cpp

15 lines
233 B
C++
Raw Normal View History

2016-08-12 10:05:27 +08:00
#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;
}