Câu trả lời:
program BT_1;
uses crt;
var s:string;
i:byte;
begin
write('nhap xau a:');
readln(s);
for i:=1 to length(s)do
if s[i] in ['0'..'9'] then
write (s[i]);
write ('nhap xau b:');
readln(s);
for i:=1 to length(s) do
if s[i] in ['a'..'z'] then
write (s[i]);
readln;
end.