write a JavaScript program to print square of a given number?
Answers
Answered by
0
Answer:
var x = prompt("Enter number : ");
var sq = Math.pow(x, 2);
document.write(sq);
Explanation:
PLEASE MARK ME AS BRAINLIEST
Answered by
0
Answer:
var num=prompt("Enter a number: ");
var square=num*num;
alert("The square of "+num +" is "+square);
Explanation:
Similar questions