Question: The nested loops for (int i = 1; i
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.
Step by Step Solution
3.52 Rating (155 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2106_61d6ac34639ff_872309.pdf
180 KBs PDF File
2106_61d6ac34639ff_872309.docx
120 KBs Word File
