Pagini recente » Monitorul de evaluare | Clasament dupa rating | Profil Vali_Deaconu | Profil Sunt_3l3v | Cod sursa (job #408079)
Cod sursa(job #408079)
var
s:string;
c,i,l,gasit:byte;
f:text;
procedure citire;
var
f:text;
begin
assign(f,'text.in');
reset(f);
readln(f,s);
close(f);
end;
begin
citire;
i:=0;
l:=0;
c:=0;
gasit:=0;
Repeat
i:=i+1;
if upcase(s[i]) in ['A'..'Z']
then
if gasit=0
then
gasit:=1
else
else
if gasit=1
then
begin
gasit:=0;
c:=c+1;
end;
until i>length(s);
for I:=1 to length(s) do
if upcase(s[i]) in ['A'..'Z']
then
l:=l+1;
assign(f,'text.out');
rewrite(f);
writeln(f,l div c);
close(f);
end.