<!DOCTYPE html>
<html>
<head>
<title>Even or odd</title>
</head>
<body>
<script type="text/javascript">
var n=prompt("Enter the number even or odd");
n=parseInt(n);
if (isNaN(n))
{
alert("Enter the number");
}
else if(n==0)
{
alert("The number is zero");
}
else if (n%2)
{
alert("The number is odd");
}
else
{
alert("The number is enen");
}
</script>
</body>
</html>
No comments
Welcome to saveracom.blogspot.com