

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
uses crt;
var n,i,s,p: integer;
a: array[1..1000] of integer;
begin
clrscr;
readln(n);
for i:=1 to n do read(a[i]);
for i:=1 to n do begin
p:=a[i];
s:=0;
while p>0 do begin
s:=s*10+p mod 10;
p:=p div 10;
end;
if s=a[i] then write(a[i],' ');
end;
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
![]()
uses crt;
var a:array[1..10000] of longint;
n,i,tong,b:longint;
begin
clrscr;
readln(n);
for i:=1 to n do
begin
tong:=0;
readln(a[i]);
b:=a[i];
while a[i] <> 0 do
begin
tong:=tong*10+a[i] mod 10;
a[i]:=a[i] div 10;
end;
if tong = b then
write(b,' ');
end;
readln;
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
![]()
Bảng tin
878
16288
459
chx học function pali
4332
2959
1966
đợi chút
878
16288
459
ok
4332
2959
1966
rồi đó. code: uses crt; var n,i,s,p: integer; a: array[1..1000] of integer; begin clrscr; readln(n); for i:=1 to n do read(a[i]); for i:=1 to n do begin p:=a[i]; s:=0; while p>0 do begin s:=s*10+p mod 10; p:=p div 10; end; if s=a[i] then write(a[i],' '); end; readln end. Rút gọnrồi đó. code: uses crt; var n,i,s,p: integer; a: array[1..1000] of integer; begin clrscr; readln(n); for i:=1 to n do read(a[i]); for i:=1 to n do begin p:=a[i]; s:=0; while p>0 do begin s:=s*10+p mo... xem thêm
878
16288
459
Ok
878
16288
459
https://hoidap247.com/cau-hoi/4814345 Cứu