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.
![](https://rs.olm.vn/images/avt/0.png?1311)
program Nenxau;
var s: string;
i, count: integer;
c: char;
begin
readln(s);
count := 1;
c := s[1];
for i := 2 to length(s) do
begin
if s[i] = c then
inc(count)
else
begin
write(count);
write(c);
count := 1;
c := s[i];
end;
end;
write(count);
write(c);
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var s:string;
i,d,dem:integer;
begin
clrscr;
write('Nhap xau S:'); readln(s);
d:=length(s);
writeln('Cac ki tu so co trong xau S:');
dem:=0;
for i:=1 to d do
if s[i] in ['0'..'9'] then
begin
write(s[i]:4);
inc(dem);
end;
writeln;
writeln('So ki tu chu so co trong xau S: ',dem);
for i:=1 to d do
if s[i] in ['0'..'9'] then s[i]:='A';
writeln('Xau sau khi doi la: ',s);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Var a:array[1..100] of integer;
i,s:integer;
Begin
For i:=1 to 100 do
Begin
Write('Nhap phan tu thu ',i,' = ');readln(a[i]);
If a[i] mod 2 <> 0 then s:=s+a[i];
End;
Write('Tong la ',s);
Readln;
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
tham khảo
uses crt;
var a:string;
i,d,dem:integer;
begin
clrscr;
write('Nhap xau a:'); readln(a);
dem:=0;
d:=length(a);
for i:=1 to d do
if a[i]=' ' then inc(dem);
writeln(dem);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
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)
uses crt;
var st,k,t:string;
d,dem,i:integer;
begin
clrscr;
readln(st);
d:=length(st);
k='';
dem=1;
for i:=2 to d do
begin
if st[i]=st[i-1] then inc(dem);
if st[i]<>st[i-1] then
btegin
str(dem,t);
if dem>1 then k:=k+t+st[i-1];
else k:=k+st[i-1];
dem=1;
end;
if (i=d) then
begin
str(dem,t);
if dem>1 then k:=k+t+st[i];
else k:=k+st[i];
end;
end;
write(k);
readln;
end.
ABABUUC nén sai bạn ơi