Created
January 18, 2018 10:05
-
-
Save keehyun2/2dfa58ef1195a646851f2a78a8278e96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var N = Number(fs.readFileSync('/dev/stdin')); | |
| // window OS - C:\dev\stdin 파일을 만들고 입력 값을 미리 저장해야함... | |
| var str = ''; | |
| for (var i = 0; i < N; i++) { | |
| for (var j = 0; j < N ; j++) { | |
| if (j < i) { | |
| str += ' '; | |
| } else { | |
| str += '*'; | |
| } | |
| } | |
| str += '\n'; | |
| } | |
| console.log(str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment