The nested loops for (int i = 1; i

Question:

The nested loops

for (int i = 1; i <= height; i++)
{
for (int j = 1; j <= width; j++) { System.out.print("*"); }
System.out.println();
}
display a rectangle of a given width and height, such as
****
****
****
Write a single for loop that displays the same rectangle.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: