Pagini recente » Istoria paginii runda/concurs.. | Cod sursa (job #1271176) | Cod sursa (job #405989) | Cod sursa (job #274350) | Cod sursa (job #291306)
Cod sursa(job #291306)
program pascal;
var f,g:text; s:byte; nrcuv,nrl,z:int64; c:char;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
nrl:=0; nrcuv:=0; s:=0;
while not seekeof(f) do
begin
read(f,c);
z:=ord(c);
if ((z>=65) and (z<=90)) or ((z>=97) and (z<=122)) then
begin
inc(nrl);
s:=1;
end
else
if s=1 then
begin
inc(nrcuv);
s:=0;
end;
end;
if s=1 then inc(nrcuv);
z:=nrl div nrcuv;
write(g,z);
close(f);
close(g);
end.