Pagini recente » Cod sursa (job #3255687) | Cod sursa (job #2917600) | Cod sursa (job #799132) | Cod sursa (job #621699) | Cod sursa (job #287355)
Cod sursa(job #287355)
program VLD4EvEr;
var f,g:text;
s:string;
i,m,n:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
n:=0;
m:=0;
while not(eof(f)) do
begin
readln(f,s);
s:=s+' ';
for i:=1 to length(s)-1 do begin
if s[i] in ['a'..'z','A'..'Z'] then n:=n+1;
if (s[i] in ['a'..'z','A'..'Z']) and (not(s[i+1] in ['a'..'z','A'..'Z'])) then m:=m+1;
end;
writeln(g,n DIV m);
close(f);
close(g);
end.