// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <vector>

using namespace std;

void f(int n)
{
    vector<int> a(n);
    for(int i = 0; i < n; i++)
    {
        a[i] = i;
    }
    for(int i = 0; i < n; i++)
    {
        cout << a[i] << endl;
    }
}

int main()
{
    f(1);
    f(2);
    f(3);
    f(4);
    return 0;
}
