Write a javascript code to print even numbers between two given numbers.
Write a javascript code to print even numbers between two given numbers.
<!DOCTYPE html>
<html>
<head>
<P>Even 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>
//Comments and Follow more program....
No comments:
Post a Comment