Pagini recente » Cod sursa (job #1825806) | Cod sursa (job #1087567) | Cod sursa (job #835973) | Cod sursa (job #2616159) | Cod sursa (job #128911)
Cod sursa(job #128911)
var k,c:integer;
m:set of 'a'..'z';
n:set of 'A'..'Z';
f,g:text;
p:boolean;
ch:char;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
c:=0;
k:=0;
m:=['a'..'z'];
n:=['A'..'Z'];
p:=false;
while not eof(f) do
begin
read(f,ch);
if ch in m+n then begin
inc(k);
p:=false;
end
else if (k>0) and (not p) then begin
inc(c);
p:=true;
end;
end;
write(g,k div c);
close(f);
close(g);
end.