Pagini recente » Cod sursa (job #2473159) | Borderou de evaluare (job #1535375) | Cod sursa (job #456522)
Cod sursa(job #456522)
var n,k:longint;
s:char;
incepe:boolean;
f,g:text;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
n:=0;
k:=0;
incepe:=false;
while not eof(f) do
begin
read(f,s);
if ((s>='a') and (s<='z')) or ((s>='A') and (s<='Z')) then
incepe:=true;
if (incepe=true) and ((s=' ') or (s='!') or (s=',') or (s='.') or (s='?')or (s='-') or (s='"') then
begin
inc(k);
incepe:=false;
end;
if (incepe=true) then
inc(n);
end;
writeln(g,n div k);
close(f);
close(g);
end.