DevJourney · code I wrote while learning

main.cpp

134 B
void nForest(int n) {
    string line;
    for (int i = 1; i <= n; i++) {
        line += "* ";
        cout << line << '\n';
    }
}