Cod sursa(job #682900)
| Utilizator | Data | 19 februarie 2012 18:05:58 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
var s:string;f,g:text;t:real;i,j,k:integer;
Begin
assign(f,'text.in');reset(f);
Readln(f,s); close(f);
i:=0;j:=0;k:=0; t:=0;
for i:=1 to length(s)+1 do
Begin
IF (s[i]>='a') and (s[i]<='z') then
Begin
j:=j+1;
k:=k+1;
end
else
Begin
IF (s[i]>='A') and (s[i]<='Z') then
Begin
j:=j+1;
k:=k+1;
end
else
Begin
If k>0 then
t:=t+1;
k:=0;
end;end;
end;
assign(g,'text.out');rewrite(g);
t:=j/t;
write(g,trunc(t));
close(g);end.
