title: End process of stdin in nodejs
body: <pre><code>process.stdin.resume();
  process.stdin.setEncoding('ascii');
  
  var input_stdin = "";
  var input_stdin_array = "";
  var input_currentline = 0;
  
  process.stdin.on('data', function (data) {
    input_stdin += data;
  });
  
  process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");
    main();
  });
  
  // Reads complete line from STDIN
  function readLine() {
    return input_stdin_array[input_currentline++];
  }
  
  function main() {
    var i = 4
    var d = 4.0
    var s = "HackerRank "
  
    var i2 = parseInt(input_stdin_array[0]);
    var d2 = parseFloat(input_stdin_array[1]);
    var s2 = input_stdin_array[2];
  
    var t1 = i + i2;
    var t2 = parseFloat(d + d2).toFixed(1);
    var s3 = s + s2;
  
    process.stdout.write(t1.toString() + "\n");
    process.stdout.write(t2.toString() + "\n");
    process.stdout.write(s3.toString());
  }
  </code></pre>
  
  <p>How can I end the stdin process to show the output? as below code?
  If you know how to end the process from stdin, you will get output. my question: How could I end the process from stdin?</p>