|
@@ -178,4 +178,74 @@ for (let i = 0; i < chessHeight; i++) {
|
|
|
|
|
|
}
|
|
|
out3.innerHTML += '\n';
|
|
|
+}
|
|
|
+//=====================================================================================================//
|
|
|
+
|
|
|
+// Задание на синий пояс: Треугольник //
|
|
|
+
|
|
|
+let out4 = document.querySelector('.out4')
|
|
|
+for (let i = 0; i < 7; i++) {
|
|
|
+ if (i == 1) {
|
|
|
+ for (let k = 0; k < 5; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 1; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 5; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ if (i == 2) {
|
|
|
+ for (let k = 0; k < 4; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 3; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 4; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ if (i == 3) {
|
|
|
+ for (let k = 0; k < 3; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 5; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 3; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ if (i == 4) {
|
|
|
+ for (let k = 0; k < 2; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 7; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 2; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ if (i == 5) {
|
|
|
+ for (let k = 0; k < 1; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 9; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+ for (let k = 0; k < 1; k++) {
|
|
|
+ out4.innerHTML += '. ';
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ if (i == 6) {
|
|
|
+
|
|
|
+ for (let k = 0; k < 11; k++) {
|
|
|
+ out4.innerHTML += '#';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ out4.innerHTML += '<br>'
|
|
|
}
|