Cod sursa(job #702961)
| Utilizator | Data | 2 martie 2012 10:17:02 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.32 kb |
var cuvinte,lungime:longint;
c:char;
f:text;
begin
assign(f,'text.in');
reset(f);
repeat
read(f,c);
if (c in ['a'..'z']) or (c in ['A'..'Z']) then lungime:=lungime+1;
if c=' ' then cuvinte:=cuvinte+1;
until eoln(f);
close(f);
assign(f,'text.ou');
rewrite(f);
write(f,lungime div cuvinte);
close(f);
end.