K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

uses crt;

var st:string;

vt:integer;

begin

clrscr;

write('Nhap xau:'); readln(st);

vt:=pos('love',st);

while vt<>0 do 

  begin

delete(st,vt,4);

end;

writeln(st);

readln;

end.

3 tháng 3 2021

 Cậu tham khảo nhé!!!

https://hoc24.vn/cau-hoi/viet-chuong-trinh-nhap-mot-xau-tu-ban-phim-thay-ky-tu-39a39-thanh-39i39-va-in-xau-da-thay-ra-man-hinh-thay-tat-ca-chu-39anh39-t.257698320219

uses crt;

var s:string;

begin

clrscr;

write('Nhap xau: '); readln(s);

while pos('a',s)<>0 do

begin

insert('i',s,pos('a',s));

delete(s,pos('a',s),1);

end;

write('Xau sau khi chuyen la : ',s);

readln;

end.

24 tháng 3 2023

s = input("Nhập chuỗi: ")

s = ''.join(filter(lambda i: not i.isdigit(), s))

print("Chuỗi sau khi loại bỏ các chữ số: ", s)

17 tháng 3 2023

xau = input("Nhập vào một xâu bất kì: ")

xau_moi = xau.replace("choi", "hoc")

print("Xâu mới sau khi thay thế là:", xau_moi)

17 tháng 3 2023

Program HOC24;

var s: string;

d: byte;

begin

write('Nhap xau : '); readln(s);

while pos('choi',s)<>0 do

begin

d:=pos('choi',s);

delete(s,d,4);

insert('hoc',s,d);

end;

write('Xau sau khi thay la: ',s);

readln

end.

uses crt;

var st:string;

d,i:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do 

  if not (st[i] in ['0'..'9']) then write(st[i]);

readln;

end.

uses crt;

var st:string;

i,d:integer;

begin

clrscr;

write('Nhap xau:'); readln(st);

d:=length(st);

writeln('Xau vua nhap la: ',st);

for i:=1 to d do 

  if st[i]=#32 then st[i]:='_';

writeln('Xau thay the la: ',st);

readln;

end.

uses crt;

var st:string;

begin

clrscr;

readln(st);

delete(st,3,5);

writeln(st);

readln;

end.

16 tháng 3 2021