Cod sursa(job #931209)
| Utilizator | Data | 28 martie 2013 08:24:47 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
program fain;
var
c:char;
cuvinte,litere:integer;
fin,fout:text;
begin
assign(fin,'text.in');
reset(fin);
while not eof(fin) do
begin
read(fin,c);
if ((c>='a') and (c<='z')) or ((c>='A') and (c<='Z')) then
cuvinte:=cuvinte+1;
while (('a'<=c) and (c<='z')) or (('A'<=c) and (c<='Z')) do
begin
read(fin,c);
litere:=litere+1;
end;
end;
close(fin);
assign(fout,'text.out');
rewrite(fout);
write(fout,litere div cuvinte);
close(fout);
end.