function show(x, y) { document.write("<tr><td>" + x + "<td>" + (x+y-x)); } document.write("<table border>"); document.write("<tr><td>X<td>X+1000-X"); show(1e9, 1000); show(1e18, 1000); show(1e27, 1000); document.write("</table>");