SHARE
TWEET

Таблица умножения

Siri0n Dec 28th, 2016 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var n = prompt("Please enter radix") - 0;
  2. document.write(
  3.     "<table><tr style='font-weight:bold'>" +
  4.     Array.apply(null, Array(n))
  5.         .map(function(_, i){
  6.             return "<td style='font-weight:bold'>" +
  7.                 Array.apply(null, Array(n))
  8.                 .map(function(_, j){
  9.                     return (i || j) ? ((i || 1)*(j || 1)).toString(n) : "";
  10.                 }).join("</td><td>") + "</td>";
  11.         }).join("</tr><tr>") +
  12.     "</tr></table>"
  13. )
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