1001.cpp 199 B

1234567891011121314151617
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;
  6. while (cin >> n)
  7. {
  8. int sum = 0;
  9. for (int i = 1; i <= n; i++) {
  10. sum += i;
  11. }
  12. cout << sum << endl << endl;
  13. }
  14. return 0;
  15. }