Cod sursa(job #608467)
| Utilizator | Data | 16 august 2011 19:09:41 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.54 kb |
program Text2;
var f:text;t:string;n,i:longint;k:0..1;cuv,lit:integer;
begin
assign(f,'text.in');
reset(f);
readln(f,t);
close(f);
n := length(t); k := 0; lit := 0;cuv := 0;
for i := 1 to n do
begin
if (upcase(t[i]) >='A') and (upcase(t[i]) <= 'Z') then
begin
lit := lit + 1;
if k = 0 then
begin
cuv := cuv + 1;
k := 1;
end;
end
else
k := 0;
end;
assign(f,'text.out');
rewrite(f);
write(f,int(lit/cuv));
close(f);
readln;
end.
