0
0
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
2288
1724
uses crt;
var s:string[30];i:longint;
begin
clrscr;
write('Nhap xau: '); read(s);
for i:=1 to length(s) do
if s[i]='N' then
begin
delete(s,i,1);
insert('*',s,i);
end;
writeln('Xau vua thay the: ',s);
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
program cai_gi_do;
uses crt;
var s:string[30];
i:byte;
begin
clrscr;
readln(s);
for i:=1 to length(s) do
begin
if(s[i]='N') then begin delete(s,i,1); insert('*',s,i); end; //xoá 1 ký tự tại vị trí i và thêm ký tự * vào vị trí i
end;
writeln(s);
readln(s);
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin