loop

#include <iostream>

int main() {
    // Step 1: Declare a variable i of type integer and initialize it with 0
    int i = 0;

    // Step 2: Start a while loop that continues as long as i is less than 5
    while (i < 5) {
        // Step 3: Print the current value of i
        std::cout << "i: " << i << std::endl;

        // Step 4: Increment the value of i by 1
        i++;

        // Step 5: End of the loop, go back to Step 2 if the condition (i < 5) is still true
    }

    // Step 6: End of the program
    return 0;
}