Pagini recente » Cod sursa (job #2547229) | Cod sursa (job #3277101) | Cod sursa (job #2081365) | Cod sursa (job #373499) | Cod sursa (job #39910)
Cod sursa(job #39910)
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);
' ':if abc then begin s:=true;inc(n) end else continue;
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.