package ru.job4j.loop;

/**
 * Class paint stroit piramidu.
 *
 * @author ypak
 * @version $Id$
 * @since 22.03
 */
public class Paint {
	/**
	 * method piramid рисует пирамиду в псевдографике.
	 * @param h - висота.
	 * @return сторку.
	 */
	public String piramid(int h) {
        StringBuilder builder = new StringBuilder();
        for (int i = 1; i <= h; i++) {
            for (int imbedded = 0; imbedded < h - i; imbedded++) {
                builder.append(" ");
            }
            builder.append("^");
            for (int j = 1; j < i * 2 - 1; j++) {
                builder.append("^");
            }
            if (i < h) {
                builder.append("\n");
            }
        }
        return builder.toString();
    }
}
@@ -481,41 +481,8 @@
   %7D%0A
-            builder.append(%22%5E%22);%0A
     
@@ -508,16 +508,17 @@
 = 1; j %3C
+=
  i * 2 -
@@ -639,12 +639,44 @@
 end(
-%22%5Cn%22
+System.getProperty(%22line.separator%22)
 );%0A 

task 4412 correct