Advertisement
Mihai_Preda

Untitled

Feb 25th, 2021
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. bool compus[nMax];
  2.  
  3. void ciur()
  4. {
  5.     for(int i = 4; i <= n; i += 2)
  6.         compus[i] = true;
  7.     for(int i = 3; i * i <= n; i += 2)
  8.         for(int j = i * i; j <= n; j += i)
  9.             compus[j] = true;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement