int a = 0;

while (a < 5) {
    // do something

    a++;
}

// or
do {
    // do something

    a++;
} while (a < 5);

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