← Back to Question List
C++ Code Walkthrough #16
Nested Loops Pattern
📄 Code
Read carefully — what does this print?1#include <iostream>2using namespace std;34int main() {5 for (int i = 1; i <= 3; i++) {6 for (int j = 1; j <= i; j++) {7 cout << "*";8 }9 cout << endl;10 }11 return 0;12}