Created
January 6, 2017 06:53
-
-
Save torpedo87/3383826fdd454c2d486a86ee50f0efed to your computer and use it in GitHub Desktop.
junwoo/codesquad
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
for(var i=1; i<=100; i++){ | |
var chk=false; | |
for(var j=2; j<i; j++){ | |
if(i%j===0){ | |
chk=false; | |
break; | |
}else{ | |
chk=true; | |
} | |
}if(i===2){ | |
chk=true | |
}; | |
if(chk===true){ | |
console.log(i); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment