Cod sursa(job #608545)
| Utilizator | Data | 17 august 2011 11:43:56 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
program textulet;
var f:text;c:char;cuv,lit:longint;k:byte;
begin
assign(f,'text.in');
reset(f);
cuv := 0; lit := 0; k := 0;
while not eof(f) do
begin
read(f,c);
if upcase(c) in ['A'..'Z'] then
begin
inc(lit);
if k = 0 then
begin
inc(cuv);
k := 1;
end;
end
else k := 0;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,lit div cuv);
close(f);
end.
