Home > Back-end >  All the primes for 100 ~ 200
All the primes for 100 ~ 200

Time:06-10

Help:
Why i>=k + 1, I not & lt;=k? Have why to + 1
C programming language Tan Haoqiang version 5 p134

CodePudding user response:

If ii>=k means he is at the end of cycle is not found his factor

CodePudding user response:

I & gt;=k + 1; In fact also can be written as I & gt; k; Is ok, because if it is the I & gt; k; That I saw the number of cycles is met I & lt;=k can not meet the needs of exit, not break out,

So can be thought of as a prime ~

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related