K
Khách

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.

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.

15 tháng 3 2021

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau S= '); readln(s);

while pos('g',s)<>0 do

begin

insert('h',s,pos('g',s));

delete(s,pos('g',s),1);

end;

write('S= ',s);

readln

end.

uses crt;

var st:string;

i,d:integer;

begin

clrscr;

write('Nhap xau:'); readln(st);

d:=length(st);

writeln('Xau vua nhap la: ',st);

for i:=1 to d do 

  if st[i]=#32 then st[i]:='_';

writeln('Xau thay the la: ',st);

readln;

end.

uses crt;

var x:string;

begin

clrscr;

write('x='); readln(x);

writeln(length(x));

readln;

end.