Loops help you execute a block of code repeatedly.

#include <iostream>

using namespace std;

int main() {
    for (int i = 1; i <= 5; i++) {
        cout << i << " ";
    }
    cout << endl;

    return 0;
}