Home > front end >  How to add the code
How to add the code

Time:10-10

Prime Numbers of 2 to 100

CodePudding user response:

https://blog.csdn.net/qq_42720683/article/details/82106964

CodePudding user response:

reference 1/f, the sky wave response:
https://blog.csdn.net/qq_42720683/article/details/82106964

Thank you, but I used to, but not can combine this code have a look

CodePudding user response:

"Onclick=" MyMunc ()?

CodePudding user response:

var arr=[];
For (var I=2; i<100; I++) {
Var cont=0;
for(var j=1; j<=I; J++) {
If (I % j==0) {
Cont++;
}
}
If (cont==2) {
Arr. Push (I);
}
}
Alert (arr);
I am a newcomer wrong please forgive me;
Change your for loop and var x to delete to write I try;
The inner HTML=x, with inner. HTML=arr. Join (", ");

CodePudding user response:

reference 4 floor weixin_42590033 response:
var arr=[];
For (var I=2; i<100; I++) {
Var cont=0;
for(var j=1; j<=I; J++) {
If (I % j==0) {
Cont++;
}
}
If (cont==2) {
Arr. Push (I);
}
}
Alert (arr);
I am a newcomer wrong please forgive me;
Change your for loop and var x to delete to write I try;
The inner HTML=x, with inner. HTML=arr. Join (", ");
last alert or don't want to, can't imagine what will happen in the

CodePudding user response:

MyMunc into MyFunc

CodePudding user response:

The
refer to the original poster 002 b! Response:
prime Numbers of 2 to 100

Have played out, ok, thank you
  • Related