Cod sursa(job #559662)

Utilizator GhitaRaulGhita Raul GhitaRaul Data 17 martie 2011 23:13:07
Problema Text Scor 60
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.35 kb
Program text1;
var  f:text;
     n,i,x:integer;
     s:string;
begin
n:=0;
x:=1;
assign(f,'text.in');reset(f);
While not eof(f) do begin
readln(f,s);
n:=n+length(s);
For i:=1 to length(s) do begin
If s[i]=' ' then  x:=x+1;
If (s[i]<'A')or(s[i]>'z') then n:=n-1;
end;
    end;
assign(f,'text.out');rewrite(f);
writeln(f,n div x);
close(f);
end.