for6 —— 质数2
2018-12-11 本文已影响0人
浮_屠
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>质数2</title>
<script type="text/javascript">
for(var i=2; i<=100; i++){
var flag = true;
for(var j = 2; j<i; j++){
if(i%j==0){
flag = false;
break;
}
}
if(flag){
console.log(i);
}
}
</script>
</head>
<body>
</body>
</html>