嵌套循环
2025-07-17 09:17:08
发布于:河北

for (int i = 1; i <= 3; i++) { // Outer loop runs 3 times
for (int j = 1; j <= n; j++) { // Inner loop prints 1 to n
cout << j << " ";
}
cout << endl; // New line after each inner loop completes
}


这里空空如也




















有帮助,赞一个