test 1
This commit is contained in:
parent
68be4c01bf
commit
edfa057838
|
@ -15,7 +15,8 @@
|
|||
"program": "${workspaceFolder}\\src\\index.ts",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/**/*.js"
|
||||
]
|
||||
],
|
||||
"preLaunchTask": "build_backend"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build_backend",
|
||||
"type": "npm",
|
||||
"script": "build",
|
||||
"path": "/",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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
Loading…
Reference in New Issue