fork(1) download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. var StrtHash = "";
  5. var StrtSpc = "";
  6. var ChsTbl = "";
  7. var Hgt = 9;
  8. var Wdt = 9;
  9. var Cnt = 0;
  10. while(Cnt < Wdt) {
  11. Cnt++;
  12. if(Cnt % 2 == 0)
  13. StrtHash = StrtHash + " ", StrtSpc = StrtSpc + "#";
  14. else StrtHash = StrtHash + "#", StrtSpc = StrtSpc + " ";
  15. }
  16. var Cnt = 0;
  17. while(Cnt < Hgt) {
  18. Cnt++;
  19. if (Cnt % 2 != 0)
  20. ChsTbl = ChsTbl + StrtHash + "\n";
  21. else ChsTbl = ChsTbl + StrtSpc + "\n";
  22. }
  23. console.log(ChsTbl);
Success #stdin #stdout 0.06s 28568KB
stdin
Standard input is empty
stdout
# # # # #
 # # # # 
# # # # #
 # # # # 
# # # # #
 # # # # 
# # # # #
 # # # # 
# # # # #