Pagini recente » Cod sursa (job #30541) | Cod sursa (job #2322406) | Cod sursa (job #2828637) | Cod sursa (job #1351383) | Cod sursa (job #1051184)
Program text_infoarena;
const lmic=['a'..'z']; lmare=['A'..'Z'];
var f,g:text;
i,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 ((c in lmic) or (c in lmare)) then inc(l);
if (((c in lmic) or (c in lmare)) and (not(ok)))
then
begin
ok:=true;
inc(k);
end;
if (not((c in lmic) or (c in lmare)) and (ok))
then
begin
ok:=false;
end;
end;
writeln(g,trunc(l/k));
close(f); close(g);
END.