Pagini recente » Cod sursa (job #566727) | Cod sursa (job #1078277) | Cod sursa (job #2492507) | Cod sursa (job #1195860) | Cod sursa (job #39911)
Cod sursa(job #39911)
program whocares;
var f:text;
n:longword=1;
l:longword;
c:char;
abc,s:boolean;
begin
assign(f,'text.in');reset(f);
while not eof(f) do
begin
read(f,c);
s:=false;
case c of
'a'..'z','A'..'Z':inc(l);
' ':begin s:=true; if abc then inc(n) else continue end
else continue;
end;
abc:=c in ['A'..'Z','a'..'z'];
end;
close(f);
if not s then inc(n);
assign(f,'text.out');rewrite(f);
write(f,l div n);
close(f);
end.