Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. int liczbacyfr(int n) {
  2. int g;
  3. g=10;
  4. while(n>=g){
  5. g=g*10;
  6. }
  7. return g;
  8. }
  9. int main()
  10. {
  11. int x,xs,g,r;
  12. x=1; g=10;
  13. while(x<=10000000){
  14. xs=x*x;
  15. r=xs-x;
  16. g=liczbacyfr(x);
  17. if((r%g)==0){
  18. printf("%d\n", x);
  19. }
  20. x=x++;
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement