khai báo tự viết
for i:=1 to n do
if sqr(trunc(sqrt(a[i])))=a[i] then write(a[i]);
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
if sqrt(a[i])=trunc(sqrt(a[i])) then write(a[i]:4);
readln;
end.