Created
May 29, 2015 19:40
-
-
Save anotherjung/9cf670d68418a1983673 to your computer and use it in GitHub Desktop.
Basic Algorithms // source http://jsbin.com/juqoti
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Basic Algorithms</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000 | |
for (var i=0; i<=1000; i++) | |
{ | |
if (i%2 !==0) | |
console.log(i); | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000 | |
for (var i=0; i<=1000; i++) | |
{ | |
if (i%2 !==0) | |
console.log(i); | |
}</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//(Odd Numbers) Write a program that would print all the odd numbers from 1 to 1000 | |
for (var i=0; i<=1000; i++) | |
{ | |
if (i%2 !==0) | |
console.log(i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment