Cod sursa(job #728929)

Utilizator Iandrei96Isaila Ioan Andrei Iandrei96 Data 29 martie 2012 09:33:44
Problema Text Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.65 kb
var f,g:text;
    c:char;
    k,b,v:longint;
begin
 assign(f,'text.in');reset(f);
 assign(g,'text.out');rewrite(g);
 k:=0;b:=0;v:=0;
 while not eof(f) do
 begin
  read(f,c);
  if ((ord(c)>65) and (ord(c)<91)) or ((ord(c)>97) and (ord(c)<123))
                                  then begin
                                         inc(k);
                                         inc(b);
                                       end
                                  else if b<>0 then begin inc(v);
                                                          b:=0

                                  end;
 end;
 write(g,b div v);
 close(f);close(g);
 end.