Advertisement
MadCortez

Untitled

Sep 22nd, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.55 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.          else
  22.          begin
  23.             break;
  24.          end;
  25.       end
  26.       else
  27.       begin
  28.          break;
  29.       end;
  30.    end;
  31.    readln;
  32. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement