Ace Ace is an embeddable code editor written in JavaScript.
Javascript editor theme 1
var rows = prompt("How many rows for your multiplication table?"); var cols = prompt("How many columns for your multiplication table?"); if(rows == "" || rows == null) rows = 10; if(cols== "" || cols== null) cols = 10; createTable(rows, cols); function createTable(rows, cols) { var j=1; var output = ""; for(i=1;i<=rows;i++) { output = output + " "; while(j<=cols) { output = output + ""; j = j+1; } output = output + ""; j = 1; } output = output + "
" + i*j + "
"; document.write(output); }
Javascript editor theme 2
var rows = prompt("How many rows for your multiplication table?"); var cols = prompt("How many columns for your multiplication table?"); if(rows == "" || rows == null) rows = 10; if(cols== "" || cols== null) cols = 10; createTable(rows, cols); function createTable(rows, cols) { var j=1; var output = ""; for(i=1;i<=rows;i++) { output = output + ""; while(j<=cols) { output = output + ""; j = j+1; } output = output + ""; j = 1; } output = output + "
" + i*j + "
"; document.write(output); }