Pagini recente » Cod sursa (job #3157819) | Cod sursa (job #2522169) | Cod sursa (job #104685) | Cod sursa (job #1871116) | Cod sursa (job #535723)
Cod sursa(job #535723)
program sdasda;
var s,s1:string;
i,lung,lungmax,c:integer;
lungmed:real;
f,g:text;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
read(f,s);
s1:='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
i:=1;
while i<=length(s)+1 do
begin
if pos(s[i],s1)>0 then
lung:=lung+1
else
begin
lungmax:=lungmax+lung;
lung:=0;
if pos(s1,s[i-1])>0 then
c:=c+1
else
i:=i+1;
end;
i:=i+1;
end;
write(g,trunc(lungmax/c));
close(f);
close(g);
end.