Pagini recente » Cod sursa (job #2531769) | Cod sursa (job #478434) | Cod sursa (job #2053223) | Cod sursa (job #673583) | Cod sursa (job #603516)
Cod sursa(job #603516)
program teext;
var c:char;
f,g:text;
cuv,lt:word;
cond:boolean;
begin
assign (f,'text.in'); reset (f);
assign (g,'text.out'); rewrite (g);
lt:=0;
cuv:=0;
repeat cond:=false;
repeat read (f,c);
if (((c>=#65) and (c<=#90)) or ((c>=#97) and (c<=#122))) then begin lt:=lt+1;
cond:=true;
end
else if (cond) then begin cuv:=cuv+1;
cond:=false;
end;
until ((c=#32) or (c=#26));
if (c=#26) then readln (f);
until (eof(f));
write (g,lt div cuv);
close (f);
close (g);
end.