Pagini recente » Cod sursa (job #700323) | Cod sursa (job #464657) | Cod sursa (job #1205905) | Cod sursa (job #1809670) | Cod sursa (job #1051197)
Program text_infoarena;
const lmic=['a'..'z']; lmare=['A'..'Z'];
var f,g:text;
l,k:longint;
c:char;
ok:boolean;
BEGIN
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
l:=0; k:=1; ok:=false;
while (not(eof(f))) do
begin
read(f,c);
if (not(ok)) then
begin
if ((c in lmic) or (c in lmare)) then
begin
k:=k+1;
ok:=true;
end;
end;
If ((c in lmic) or (c in lmare)) then
inc(l)
else
ok:=false;
end;
if k>0 then
writeln(g,trunc(l/k))
else writeln(g,'0') ;
close(f); close(g);
END.