Cod sursa(job #420746)
Utilizator | Data | 20 martie 2010 14:32:37 | |
---|---|---|---|
Problema | Text | Scor | 30 |
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 eoln(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.