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.
const fi='inp.inp';
fo='out.inp';
var f1,f2:text;
st:array[1..100]of string;
i,n:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,st[n]);
end;
for i:=1 to n do
writeln(f2,length(st[i]));
close(f1);
close(f2);
end.
const fi='input.txt';
fo='output.txt';
var f1,f2:text;
st:string[125];
a:array[1..125]of string;
i,d,dem,kt,j:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,st);
d:=length(st);
dem:=1;
a[1]:=st[1];
for i:=1 to d do
begin
kt:=0;
for j:=1 to dem do
if a[j]=st[i] then kt:=1;
if kt=0 then
begin
inc(dem);
a[dem]:=st[i];
end;
end;
for i:=1 to dem do
begin
dem1:=0;
for j:=1 to d do
if a[i]=st[j] then inc(dem1);
writeln(f2,a[i],' xuat hien ',dem1,' lan');
end;
close(f1);
close(f2);
end.
const fi='kt.txt';
fo='kq.out';
var f1,f2:text;
s:string;
i,dem,d:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,s);
vt:=pos('anh',s);
while vt<>0 do
begin
delete(s,vt,3);
insert(s,vt,'em');
vt:=pos('anh',s);
end;
writeln(f2,s);
close(f1);
close(f2);
end.
const fi='xau.inp';
fo='xau.out';
var f1,f2:text;
a:array[1..100]of string;
i,d:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n]);
end;
for i:=1 to n do
begin
for j:=1 to length(a[i]) do
a[i][j]:=upcase(a[i][j]);
end;
for i:=1 to n do
writeln(f2,length(a[i]),' ',a[i]);
close(f1);
close(f2);
end.