Pagini recente » Cod sursa (job #3235178) | Cod sursa (job #2918310) | Cod sursa (job #3235685) | Cod sursa (job #905019) | Cod sursa (job #1051200)
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(eoln(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.