Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Program4</title>
- <style>
- th{
- background-color: rgb(185, 75, 93);
- }
- td{
- background-color: pink;
- }
- </style>
- </head>
- <body>
- <script>
- document.write("<center><table border='1' width='300px'>");
- document.write("<tr><th>NUMBER</th><th>SQUARE</th><th>CUBE</th></tr>");
- for(n=0;n<=10;n++){
- document.write("<tr><td>"+n+"</td><td>"+n*n+"</td><td>"+n*n*n+"</td></tr>");
- }
- document.write("</table></center>");
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment