Cod sursa(job #1452978)

Utilizator Patricia26Patricia-Georgiana Patricia26 Data 22 iunie 2015 15:14:20
Problema Text Scor 20
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.8 kb
var cuv,lit:integer;
    f,g:text;
    ok:boolean;
    c:char;
 begin
  assign(f,'text.in');reset(f);
  assign(g,'text.out');rewrite(g);
  ok:=false;
  while not eoln(f) do begin
  read(f,c);
  if (('a'<=c) and (c<='z'))or(('A'<=c) and (c<='Z')) then begin
                                                           lit:=lit+1;
                                                           ok:=true;
                                                           end
                                                      else begin
                                                           cuv:=cuv+1;
                                                           ok:=false;
                                                           end;
  end;
  write(g,round(lit/cuv));
  close(f);
  close(g);
 end.