Cod sursa(job #562712)

Utilizator CraciunRaduCraciun Radu CraciunRadu Data 23 martie 2011 18:52:19
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.51 kb
Program iatext;
var f,g:text;
    k,l,cuv:integer;
    c:char;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
k:=0;
l:=0;
cuv:=0;
While not eof(f) do begin
 read(f,c);
 If c in ['A'..'Z','a'..'z'] then begin inc(l);
                                        If k=0 then inc(cuv);
                                        k:=1;
                                  end
                             else k:=0;
                    end;
writeln(g,l div cuv);
close(f); close(g);
end.