Cod sursa(job #278125)

Utilizator anthraxztAndrei Tatar anthraxzt Data 12 martie 2009 09:25:36
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.35 kb
program kext;
var c,l,i:longword;
    ch:char;
    f:text;
begin
 assign(f,'text.in');reset(f);
 c:=0;l:=0;
 while not eof(f) do
  begin
   i:=1;read(f,ch);
   while ch in ['a'..'z','A'..'Z'] do begin inc(i);read(f,ch) end;
   if i>1 then begin inc(c);inc(l,i-1); end;
  end;
 assign(f,'text.out');rewrite(f);
 write(f,l div c);
 close(f)
end.