Bài 1:
program oken;
uses crt;
var s: string[15];
i:byte;
begin
clrscr;
write('Nhap 1 xau: '); readln(s);
writeln('In moi ki tu 1 dong: ');
for i:=1 to length(s) do
writeln(s[i]);
readln;
end.
Bài 2:
program oken;
uses crt;
var s: string;
i,hoa,thuong,so:byte;
begin
clrscr;
write('Nhap 1 xau: '); readln(s);
for i:=1 to length(s) do
if s[i] in ['A'..'Z'] then
hoa:=hoa+1
else
if s[i] in ['a'..'z'] then
thuong:=thuong+1
else so:=so+1;
writeln('So ki tu la chu hoa: ',hoa);
writeln('So ki tu la chu thuong: ',thuong);
writeln('So ki tu la chu so: ',so);
readln;
end.