Cod sursa(job #608506)
| Utilizator | Data | 16 august 2011 23:37:57 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
program textulet;
var f:text;c:char;cuv,lit:longint;
begin
assign(f,'text.in');
reset(f);
cuv := 0; lit := 0;
while not eof(f) do
begin
read(f,c);
if upcase(c) in ['A'..'Z'] then
begin
cuv := cuv + 1;
while (upcase(c) in ['A'..'Z']) and (not eof(f)) do
begin
lit := lit + 1;
read(f,c);
end;
end;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,lit div cuv);
close(f);
end.
