GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — goo/process.stdout.js at master · singcl/goo Expand file tree/ Copy pathprocess.stdout.jsMore file actions 16 lines (16 loc) · 532 Bytes / Copy pathprocess.stdout.jsFile metadata and controls16 lines (16 loc) · 532 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 /*1:声明变量*/ var num1, num2; /*2:向屏幕输出,提示信息,要求输入num1*/ process.stdout.write('请输入num1的值:'); /*3:监听用户的输入*/ process.stdin.on('data', function(chunk) { if (num1 === undefined) { num1 = Number(chunk); /*4:向屏幕输出,提示信息,要求输入num2*/ process.stdout.write('请输入num2的值'); } else { num2 = Number(chunk); process.stdout.write('结果是:' + (num1 + num2)); process.exit(); } }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |