Не могу по дебагу понять, почему на печать выводит немного не то.
Уважаемые, подскажите, пожалуйста - что поправить?
package com.javarush.task.pro.task04.task0405;
/*
Незаполненный прямоугольник
*/
public class Solution {
public static void main(String[] args) {
int height = 0;
int width = 0;
while (height < 10) {
while (width < 20 && height == 0) {
System.out.print("Б");
width++;
}
width = 0;
while (width < 20 && height > 0 && height < 9) {
if (width == 0) {
System.out.print("Б");
}
if (width > 0 && width < 19) {
System.out.print(" ");
}
if (width == 19) {
System.out.println("Б");
}
width++;
}
width = 0;
while (width < 20 && height == 9) {
System.out.print("Б");
width++;
}
width = 0;
height++;
}
}
}