SHARE
TWEET

Untitled

a guest Feb 18th, 2020 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>  
  2.  
  3.            
  4.             let n = prompt("Enter a number");
  5.             let row, col;
  6.             for(row = 1; row <= n; row++)
  7.             {
  8.                 for(col = 1; col <= row; col++){
  9.                     if ((col+row) % 2 == 0){
  10.                         document.write("1")
  11.                     }
  12.                     else{
  13.                         document.write("0");
  14.                     }                  
  15.                 }
  16.                 document.write("<br>");
  17.             }
  18.            
  19.             </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top