Answer to Question #272732 in C++ for bawag

Question #272732

write nested loops to produce the following output


*******

  • * *
  • * *
  • ******* *
  • * *
  • * *
  • ******* *
  • * *
  • * *
  • **************************
1
Expert's answer
2021-11-28T11:45:10-0500
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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS