The key is the second judge condition
I can't, I/2.. I/3... I/4,,,,,,,,, can output the answer
CodePudding user response:
First you have to turn code indentation line feed, or looking at it is too bad, the second as if your way for a bit, advice online looking for example to look atCodePudding user response:
The code is as follows:int main () {
int n;
While (cin & gt;> N) {
For (int I=2; iBool is_su=true;
For (int j=2; j <=I/2; + + j) {
If (I % j==0) {
Is_su=false;
break;
}
}
If (is_su) {
cout }
}
cout}
return 0;
}
CodePudding user response:
N==100, 100 thought prime Numbers