Advertisement
Guest User

Untitled

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