Write a Javascript code to print Odd Numbers between two Numbers.
<!DOCTYPE html>
<html>
<head>
<P>Odd Numbers are....</p>
<script language="Javascript">
var n,x;
x=prompt("Input initial Number...");
n=prompt("Input the Number...");
for(x;x<=n;x++)
{
if(x%2!=0)
{
document.write(x+"<br>");
}
}
</script>
</head>
</html>
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
Delete