<!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>
网友评论