#include <iostream> using namespace std; int main() { //利用嵌套循环打印星图 //外层循环,外执行一次,内执行一轮 for (int i = 0; i < 10; i++) { //内层循环 for (int j = 0; j < 10; j++) { cout << " * "; } cout << endl; } system("pause"); return 0; }
2023-10-24 09:03:52
#include <iostream> using namespace std; int main() { //利用嵌套循环打印星图 //外层循环,外执行一次,内执行一轮 for (int i = 0; i < 10; i++) { //内层循环 for (int j = 0; j < 10; j++) { cout << " * "; } cout << endl; } system("pause"); return 0; }