
Given a number n, write a programming to determine its square root if it is possible, in the contraly case print an appropriate massege on the screen.

<html>
<script>
function check(){
var n=document.getElementById("num").value;
if(!isNaN(n)){
alert("Entered value is integer!");
}
else{
alert("Entered value is not an integer!");
}
var num=parseInt(n);
alert("Square root of a number: "+Math.sqrt(num));
}
</script>
Enter Number<input type="text" id="num"><input type="button" value="Check" onclick="check();">
</html>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.