Computer Science, asked by shadiyashameer, 3 months ago

write a JavaScript program to print square of a given number?​

Answers

Answered by Anjit12
0

Answer:

var x = prompt("Enter number : ");

var sq = Math.pow(x, 2);

document.write(sq);

Explanation:

PLEASE MARK ME AS BRAINLIEST

Answered by jeromeseejo73
0

Answer:

var num=prompt("Enter a number: ");

var square=num*num;

alert("The square of "+num +" is "+square);

Explanation:

Similar questions