Cod sursa(job #420756)

Utilizator C0Mr4d3yonootz321 C0Mr4d3 Data 20 martie 2010 14:43:22
Problema Text Scor 50
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.4 kb
program text1;
var f:text;
    a:string;
    c:char;
    nl,nc:word;
begin
  assign(f,'text.in');
  reset(f);
  nc:=0;
  nl:=0;
  while not eof(f) do
    begin
      read(f,c);
      if (upcase(c)>='A') and (upcase(c)<='Z') then
        nl:=nl+1;
      if c=' ' then
        nc:=nc+1;
    end;
  close(f);
  assign(f,'text.out');
  rewrite(f);
  writeln(f,nl div (nc+1));
  close(f);
end.