Cod sursa(job #140169)

Utilizator andrici_cezarAndrici Cezar andrici_cezar Data 21 februarie 2008 14:01:07
Problema Text Scor 50
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.35 kb
program p21;
var f,g:text;
    c:char;
    r,nrm,nrc:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
nrm:=0;
nrc:=0;
while not eof(f) do
begin
read(f,c);
if c=' ' then
              nrc:=nrc+1

 else if (c in ['A'..'Z','a'..'z']) then nrm:=nrm+1;
end;
nrc:=nrc+1;
  r:=nrm div nrc;
writeln(g,r);
close(g);
end.