Pagini recente » Cod sursa (job #3175550) | Cod sursa (job #405812)
Cod sursa(job #405812)
var f,g:text;
szo,db:longint;
a,b:char;
Begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
szo:=0; szo:=0;
read(f,a);
if upcase(a) in ['A'..'Z'] then begin db:=db+1;
szo:=szo+1;
end;
while not eof(f) do begin
read(f,b);
if upcase(b) in ['A'..'Z'] then db:=db+1;
if (upcase(b) in ['A'..'Z'] ) and (not (upcase(a) in ['A'..'Z'])) then
szo:=szo+1;
a:=b;
end;
writeln(g,db div szo);
close(f);
close(g);
end.