Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- N, N1, N2, z, a, x, y, i: integer;
- m, h: real;
- begin
- for N := 1000 to 9999 do
- begin
- x := N div 1000;
- N1 := N mod 1000;
- y := N1 div 100;
- N2 := N1 mod 100;
- z := N2 mod 10;
- a := N2 div 10;
- if (x = y) and (z = a) then
- begin
- m := sqrt(N);
- if trunc(m) = m then
- begin
- writeln(N);
- end
- else
- begin
- break;
- end;
- end
- else
- begin
- break;
- end;
- end;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement