Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool prostoe(int i)
  5. {
  6. for(int j=2;j<i/2;j++)
  7. if(i%j==0)
  8. return 0;
  9. return 1;
  10. }
  11. int main()
  12. {
  13. for(int i=600851475143/2;i!=0;i--)
  14. {
  15. if(600851475143%i==0 && prostoe(i))
  16. cout<<i;
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement