Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
uses crt;
var S : string;
i : byte;
begin
clrscr;
readln(S);
i := 1;
while i < length(S) do
begin
if S[i] = S[i + 1] then delete(S, i, 1)
else i := i + 1;
end;
write(S);
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
uses crt;
var s: string;
count,i: integer;
begin
clrscr;
readln(s); i:=0;
while i<length(s) do begin
if s[i]=s[i+1] then delete(s,i,1);
inc(i);
end;
write(s);
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin