Sunday, 10 April 2016

Write A Java Script That Calculates The Squares And Cubes Of The Numbers From 0 To 10 And Outputs XHTML Text That Displays The Resulting Values In An XHTML Table Format, As Follows: Number Square Cube

Write A Java Script That Calculates The Squares And Cubes Of The Numbers From 0 To 10 And Outputs XHTML Text That Displays The Resulting Values In An XHTML Table Format, As Follows: Number Square Cube 

0 0 0 
1 1 1 
2 4 8 
3 9 27 
4 16 64 
5 25 125 
6 36 216 
7 49 343 
8 64 512 
9 81 729 
10 100 1000 

Copy Code From Here:

<html>
<head> 
<script> 
document.write( "<table> <tr> <th>Number</th> <th>Square</th> <th>Cube</th> </tr>" ) 
for(var n=0; n<=10; n++) 

document.write( "<tr><td>" + n + "</td><td>" + n*n + "</td><td>" + n*n*n + "</td></tr>" ) 

document.write( "</table>" ) 
</script> 
</head> 
</html>

OUTPUT:-

www.programmingwithbasics.com

Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date. If you have any Query or Question you can ask in the group, I will Try To Solve your Query and try to answers of your Questions withing 24 Hours, You can also Email me or comment below Please suggest to your Friends to join and like our page and don't forget to Subscribe. Enter your Email and click to subscribe.

subodh yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment