Advertisement
MadCortez

Untitled

Sep 22nd, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. var
  2. N, N1, N2, z, a, x, y, i: integer;
  3. m, h: real;
  4.  
  5. begin
  6. for N := 1000 to 9999 do
  7. begin
  8. x := N div 1000;
  9. N1 := N mod 1000;
  10. y := N1 div 100;
  11. N2 := N1 mod 100;
  12. z := N2 mod 10;
  13. a := N2 div 10;
  14. if (x = y) and (z = a) then
  15. begin
  16. m := sqrt(N);
  17. if trunc(m) = m then
  18. begin
  19. writeln(N);
  20. end;
  21. end;
  22. end;
  23. readln;
  24. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement