Skip to content

Instantly share code, notes, and snippets.

@skrosoft
Created October 1, 2015 23:54
Show Gist options
  • Save skrosoft/547991140c741ed16f31 to your computer and use it in GitHub Desktop.
Save skrosoft/547991140c741ed16f31 to your computer and use it in GitHub Desktop.
process.stdin.resume();
process.stdin.setEncoding("ascii");
var input = "";
process.stdin.on("data", function (chunk) {
input += chunk;
});
process.stdin.on("end", function () {
// mi codigo
for (var i=0; i<input; i++){
for (var j=0; j<input-i-1; j++) process.stdout.write(" ");
for (var j=0; j<i+1; j++) process.stdout.write("#");
process.stdout.write("\n");
}
// fin de mi codigo
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment