This commit is contained in:
Костя 2025-06-27 15:02:55 +03:00
parent 68be4c01bf
commit edfa057838
4 changed files with 20 additions and 5 deletions

3
.vscode/launch.json vendored
View File

@ -15,7 +15,8 @@
"program": "${workspaceFolder}\\src\\index.ts",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
],
"preLaunchTask": "build_backend"
}
]
}

12
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build_backend",
"type": "npm",
"script": "build",
"path": "/",
"problemMatcher": []
}
]
}

View File

@ -1,8 +1,10 @@
//Обучение ЦИКЛАМ
function DrawLine(count: number, countP: number){
const minimalString = '*';
const minimalP = ' ';
let result = minimalP.repeat(countP) + minimalString.repeat(count)
let result = minimalP.repeat(countP) + minimalString.repeat(count) //с начала рисуем пробелы (countP) а потом зведочки
console.log(result);
}
@ -17,8 +19,8 @@ let chisloN: number = 3;
// }
for(let index = 1; index <= chisloN; index = index +2){
DrawLine(index, chisloN -index);
for(let index = 1; index <= chisloN; index = index +2){ //запись, index = index +2, нам дает все не четные числа
DrawLine(index, chisloN);
}
// let index = 1;

File diff suppressed because one or more lines are too long