Cod sursa(job #273440)
| Utilizator | Data | 8 martie 2009 16:15:17 | |
|---|---|---|---|
| Problema | Text | Scor | 50 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.39 kb |
program texts;
var f:text;
c:char;
nrc,nrl:longint;
begin
nrl:=0; nrc:=0;
assign(f,'text.in');
reset(f);
while not eof(f) do begin
read(f,c);
case c of
'a'..'z': inc(nrl);
'A'..'Z': inc(nrl);
end;
if c=' ' then inc(nrc);
end;
close(f);
inc(nrc);
assign(f,'text.out');
rewrite(f);
write(f,nrl div nrc);
close(f);
end.