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.

21 tháng 3 2022

Cho em lời giải với ạ em đang thi ạ

 

2:

uses crt;

var st:string;

d,i,dem1,dem2:integer;

begin

clrscr;

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

d:=length(st);

dem1:=0;

dem2:=0;

for i:=1 to d do

  begin

if st[i] in ['0'..'9'] then inc(dem1);

if (st[i] in ['a'..'z']) or (st[i] in ['A'..'Z']) then inc(dem2);

end;

writeln('So ki tu la chu so la: ',dem1);

writeln('So ki tu la chu cai la: ',dem2);

for i:=1 to d do 

  if st[i] in ['0'..'9'] then delete(st,i,1);

writeln('Xau sau khi xoa cac chu so la: ',st);

readln;

end. 

10 tháng 5 2021

Program HOC24;

var s: string;

begin

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

write('Xau sau khi loc: ');

for i:=1 to length(s) do

if s[i] in ['A'..'z'] then write(s[i]);

readln

end.

uses crt;

var st:string;

i,d,dem:integer;

begin

clrscr;

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

d:=length(st);

dem:=0;

for i:=1 to d do 

  if (st[i] in ['a'..'z']) or (st[i] in ['A'..'Z']) then inc(dem);

writeln(dem);

readln;

end.

25 tháng 2 2018

Var a: string;

 i, Dem: integer;

Begin

 writeln(‘nhap xau:’);

 Readln(a);

 Dem:=0;

 For i:=1 to length(a) do

 If (‘a’<=a[i]) and (a[i]<=’z’)

  Dem:= Dem+1;

 Writeln(Dem);

 Readln

End.

20 tháng 8 2019

Var a: string;

  i, Dem: integer;

Begin

 writeln(‘nhap xau:’);

 Readln(a);

 Dem:=0;

 For i:=1 to length(a) do

 If (‘A’<=a[i]) and (a[i]<=’Z’) then

  Dem:= Dem+1;

 Writeln(Dem);

 Readln

End.

28 tháng 4 2021