write nested loops to produce the following output
*******
for (int i = 0; i < 3) {
cout << "******" << endl;
cout << "**" << endl;
cout << "**" << endl;
for (int j = 0; j < 3; j++) {
cout << "******" << endl;
cout << "**" << endl;
cout << "**" << endl;
for (int k = 0; k < 3; k++) {
cout << "******" << endl;
cout << "**" << endl;
cout << "**" << endl;
cout << "******";
}
cout << "******";
}
cout << "******" << endl;
}
Comments
Leave a comment