Thứ Ba, 3 tháng 5, 2022

THAYTU PASCAL

var    s:string;x:longint;
procedure nhap;
begin
    readln(s); 
end;

procedure xuli;
begin
    while pos('anh',s) > 0 do
    begin
        x:=pos('anh',s);
        delete(s,x,3);
        insert('em',s,x);
    end;
    writeln(s);
end;

begin
    assign(input, 'THAYTU.inp');reset(input);
    assign(output, 'thaytu.out');rewrite(output);
    nhap;
    xuli;
    close(input);close(output);
end.

Không có nhận xét nào:

Đăng nhận xét

Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.