Tin học viết chương trình nhập 1 xâu bất kì từ bàn phím hãy thay thế các kí tự P thành p 26/07/2021 By Katherine viết chương trình nhập 1 xâu bất kì từ bàn phím hãy thay thế các kí tự P thành p
program thaythe; uses crt; var st:string; begin clrscr; write(‘Nhap xau: ‘); readln(st); while pos(‘P’,st)<>0 do begin insert(‘p’,st,pos(‘P’,st)); delete(st,pos(‘P’,st),1); end; write(st); readln end. Trả lời
program thaythekytu; uses crt; var s:string; begin clrscr; write(‘Nhap xau: ‘); readln(s); while pos(‘P’,st)<>0 do begin insert(‘p’,s,pos(‘P’,s)); delete(s,pos(‘P’,s),1); end; write(s); readln end. Trả lời