O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
<!DOCTYPE html> <html> <head> <title>Square and Qube of Number</title> </head> <body> <table align="center" border="1" cellpadding="5px" cellspacing="0"> <tr> <th>Number</th> <th>Square</th> <th>Cube</th> </tr> <script language="javascript"> for(a=0;a<=10;a++) { document.write("<tr><td>"+a+"</td><td>"+(a*a)+"</td><td>"+(a*a*a)+"</td></tr>"); } </script> </body> </html>
▶ Run Code
🖥 Output: