Thursday, 24 July 2014

Learn java script.

Calculate n^n using java script.

Learn java script.
Program 1: 

var a = parseInt(prompt("Enter your number"));

 var b = a;

 var i;

 for (i = 0; i <= b; i++)

  

a = a * b;  

 a = a / (b * b);  

alert("the number is: " + a);
var a = prompt("Enter value for Table:"); 
var i; 
for (i = 1; i <= 10; i++) 

c = i * a; 
alert(c); 
}

Print Table in javascript:

Program 2:

var a = prompt("Enter value for Table:");  

var i; for (i = 1; i <= 10; i++) 

  

c = i * a; alert(c); 

 }

1 comment:

  1. This is one of the best blogs on the internet. Really informational and amazing content. Independence Day Speech in Telugu

    ReplyDelete