Nhập vào 1 xâu kí tự từ bàn phím đếm xem trong xâu đó bao nhiêu chữ cái in thường 16/08/2021 Bởi Skylar Nhập vào 1 xâu kí tự từ bàn phím đếm xem trong xâu đó bao nhiêu chữ cái in thường
Program demkt; Uses crt; Var s: string; I,t:integer; Begin Write(‘nhap xau: ‘); readln(s); t:=0; For i:=1 to length(s) do If (s[i]>=’a’) and (s[i]<=’z’) then t:=t+1; Write(‘Xau co ‘,t,’ ki tu in thuong’); Readln; End. Bình luận
uses crt;var s:string; i,d:longint;beginclrscr; write(‘Nhap xau: ‘); readln(s); for i:=1 to length(s) do if s[i] in [‘a’..’z’] then inc(d); writeln(‘Ket qua: ‘,d);readlnend. Bình luận
Program demkt;
Uses crt;
Var s: string;
I,t:integer;
Begin
Write(‘nhap xau: ‘); readln(s); t:=0;
For i:=1 to length(s) do
If (s[i]>=’a’) and (s[i]<=’z’) then t:=t+1;
Write(‘Xau co ‘,t,’ ki tu in thuong’);
Readln;
End.
uses crt;
var s:string; i,d:longint;
begin
clrscr;
write(‘Nhap xau: ‘); readln(s);
for i:=1 to length(s) do
if s[i] in [‘a’..’z’] then inc(d);
writeln(‘Ket qua: ‘,d);
readln
end.