int a;
for (a = 1; a < 5; a++) {
    // do something
}

// iterate array
#define ARRAY_SIZE 5

int array[ARRAY_SIZE] = { 1, 2, 3, 4, 5 };

int n;
for (n = 0; n < ARRAY_SIZE; n++) {
    // do something
}

// nested
int i;
int j;

for (i = 0; i < 2; i++) {
    for (j = 0; j < 2; j++) {
        // do something
    }
}

/*
    Michael Sjoeberg
    2019-08-19
    https://github.com/michaelsjoeberg/c-playground/blob/master/basics/for-loop.c
*/