Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
204 B
1
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;
}