Не за что.
var a,c: string; b: integer;
begin
write('Введите строку:');
readln(a);
for b:=1 to length(a) do begin
If a[b]='б' then c:=c+'01'
else
If a[b]='Б' then c:=c+'101'
a[length(a)-1] := a[1];
c:=a
end
end;
write(c);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Не за что.
var a,c: string; b: integer;
begin
write('Введите строку:');
readln(a);
for b:=1 to length(a) do begin
If a[b]='б' then c:=c+'01'
else
If a[b]='Б' then c:=c+'101'
else
begin
a[length(a)-1] := a[1];
c:=a
end
end;
write(c);
end.