Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function number(inputData){
- var n = Number(inputData[0]);
- var w = 4 * n + 1;
- var h = 2 * n + 5;
- h = h - 5;
- var a = (w - 3) / 2;
- console.log(`${".".repeat(a)}/|\\${".".repeat(a)}`);
- console.log(`${".".repeat(a)}\\|/${".".repeat(a)}`);
- b=-1;
- for(var i = 0; i < h; i++) {
- b++;
- console.log(`${".".repeat(a--)}*${"-".repeat(b)}*${"-".repeat(b)}*${".".repeat(a + 1)}`);
- }
- console.log(`${"*".repeat(w)}`);
- console.log(`*${".*".repeat(w / 2)}`);
- console.log(`${"*".repeat(w)}`);
- }
- //number(["4"])
- // ......./|\.......
- // .......\|/.......
- // .......***.......
- // ......*-*-*......
- // .....*--*--*.....
- // ....*---*---*....
- // ...*----*----*...
- // ..*-----*-----*..
- // .*------*------*.
- // *-------*-------*
- // *****************
- // *.*.*.*.*.*.*.*.*
- // *****************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement