program chen; uses crt; var a,b,s:string; n,i:integer; begin clrscr; write(‘Nhap xau a: ‘); readln(a); write(‘Nhap xau b: ‘); readln(b); write(‘Nhap n: ‘); readln(n); s:=”; for i:=n to length(b) do begin s:=s+b[i]; b[i]:=’ ‘; end; while b[length(b)]=’ ‘ do delete(b,length(b),1); b:=b+a+s; write(b); readln; end.
uses crt;
var a,b,s:string; n:longint;
begin
clrscr;
write(‘Nhap xau a: ‘);readln(a);
write(‘Nhap xau b: ‘);readln(b);
write(‘Nhap n: ‘);readln(n);
s:=copy(a,1,n)+b+copy(a,n+1,length(a)-n);
writeln(s);
readln
end.
program chen;
uses crt;
var a,b,s:string;
n,i:integer;
begin
clrscr;
write(‘Nhap xau a: ‘); readln(a);
write(‘Nhap xau b: ‘); readln(b);
write(‘Nhap n: ‘); readln(n);
s:=”;
for i:=n to length(b) do
begin
s:=s+b[i];
b[i]:=’ ‘;
end;
while b[length(b)]=’ ‘ do delete(b,length(b),1);
b:=b+a+s;
write(b);
readln;
end.