Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let size = prompt('Size of Elochka?')
- let a = 0;
- let b = 0;
- let c = 1;
- let d = size;
- while (a < size) {
- while (b < d) {
- console.put(' ')
- b = b + 1;
- }
- b = 0;
- while (b < c) {
- console.put('*')
- b = b + 1;
- }
- b = 0;
- c = c + 2;
- a = a + 1;
- d = d - 1;
- console.put ('\n')
- }
- a = 0;
- b = 0;
- c = 1;
- d = size;
- while (a < size) {
- while (b < d) {
- console.put (' ')
- b = b + 1;
- }
- b = 0;
- while (b < c) {
- console.put ('*')
- b = b + 1;
- }
- b = 0;
- a = a + 1;
- c = c - 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment