Pagini recente » Cod sursa (job #2112403) | Cod sursa (job #2877409) | Cod sursa (job #1896464) | Cod sursa (job #298675) | Cod sursa (job #919904)
Cod sursa(job #919904)
var f,g:text;
x:char;
nr,s:longint;
numara:boolean;
begin
nr:=0;
s:=0;
assign(f,'text.in');reset(f);
numara:=false;
while not eof(f) do
begin
read(f,x);
if x in ['A'..'Z','a'..'z'] then
numara:=true;
if x in ['A'..'Z','a'..'z'] then
s:=s+1
else
if (not(x in ['A'..'Z','a'..'z'])) and (numara=true) then
begin
nr:=nr+1;
numara:=false
end
end;
close(f);
if x in ['A'..'Z','a'..'z'] then
nr:=nr+1;
assign(g,'text.out');rewrite(g);
write(g,s div nr);
close(g);
end.