Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
204 B
2
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
    int N;
    int a = 0;
    cin >> N;
    for (int i = 0; i <= N; i++) {
        a += i;
        cout << a << " ";
    }
    return 0;
}