@@ -0,0 +1,533 @@
+package ru.job4j.loop;%0A%0A%0A/**%0A* Calculate factorial.%0A*%0A* @author Valentin Turbin%0A* @version 1%0A* @since 07.05.2017%0A*/%0A%0A%0Apublic class Paint %7B%0A%09/**%0A%09* @param build Stringbuilder%0A%09*/%0A%09private StringBuilder build = new StringBuilder();%0A%09/**%0A%09* @param h %D0%B2%D1%8B%D1%81%D0%BE%D1%82%D0%B0 %D1%91%D0%BB%D0%BA%D0%B8%0A%09* @return paint%0A%09*/%0A%09public String piramid(int h) %7B%0A%09%09int width = h * 2 - 1;%0A%09%09for (int i = 1; i %3C= h; i++) %7B%0A%09%09%09for (int j = 1; j %3C= width; j++) %7B%0A%09%09%09%09build.append(%22 %22);%0A%09%09%09%09if (j == width && i != h) %7B%0A%09%09%09%09%09build.append(%22%5Cr%5Cn%22);%0A%09%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09return build.toString();%0A%09%7D%0A%7D

task public class Paint {