Pagini recente » Cod sursa (job #1886875) | Cod sursa (job #1781857) | Cod sursa (job #2208082) | Cod sursa (job #1675464) | Cod sursa (job #997598)
Cod sursa(job #997598)
program text1;
var f,g:text;
c:char;
litere,cuvinte:qword;
ok:boolean;
bufin,bufout:array[1..65000] of byte;
begin
assign (f,'text.in'); reset (f);
assign (g,'text.out'); rewrite (G);
settextbuf (f,bufin);
settextbuf (g,bufout);
while not seekeof (f) do
begin
read (f,c);
if ((c>='a') and(c<='z')) or ((c>='A') and(c<='Z')) then
begin
inc(litere); ok:=true;
end
else
if ok then
begin
inc(cuvinte);
ok:=false;
end;
end;
write (g,trunc(litere/cuvinte));
close(f); close (g);
end.