Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // Факторизация функции Эйлера(перебор делителей)
  2. void CElgamalDlg::Factorisation(unsigned int _func)
  3. {
  4. int i = 2;
  5. while (i <= sqrt(_func))
  6. {
  7. if (_func % i == 0)
  8. {
  9. while (_func % i == 0)
  10. {
  11. Vec_Factor.push_back(i);
  12. _func /= i;
  13. }
  14. }
  15. else
  16. if (i == 2) i += 1;
  17. else
  18. i += 2;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement