Viết công thức nhập vào 1 xâu. Thay thế xâu Anh bằng xâu em trong xâu vừa nhập 12/08/2021 Bởi Charlie Viết công thức nhập vào 1 xâu. Thay thế xâu Anh bằng xâu em trong xâu vừa nhập
$program$ $tin$_$hoc;$ $uses$ $crt;$ $var$ $a:string;$ $vt: byte;$ $Begin$ $clrscr;$ $write(‘nhap$ $xau$ $a:’);$ $readln (a);$ $while$ $pos$ $(‘anh’,a)>0$ $DO$ $Begin$ $Vt:=pos(‘anh’,a);$ $Delete$ $(a,vt,3);$ $Insert$ $(’em’,a,vt);$ $End;$ $Write(‘xau$ $a$ $sau$ $khi$ $thay$ $the$ $la’,a);$ $Readln$ $End.$ BẠN THAM KHẢO. Bình luận
$program$ $tin$_$hoc;$
$uses$ $crt;$
$var$ $a:string;$
$vt: byte;$
$Begin$
$clrscr;$
$write(‘nhap$ $xau$ $a:’);$ $readln (a);$
$while$ $pos$ $(‘anh’,a)>0$ $DO$
$Begin$
$Vt:=pos(‘anh’,a);$
$Delete$ $(a,vt,3);$
$Insert$ $(’em’,a,vt);$
$End;$
$Write(‘xau$ $a$ $sau$ $khi$ $thay$ $the$ $la’,a);$
$Readln$
$End.$
BẠN THAM KHẢO.