Pagini recente » Monitorul de evaluare | Cod sursa (job #1482228) | Cod sursa (job #177106) | Cod sursa (job #3226375) | Cod sursa (job #41818)
Cod sursa(job #41818)
var f1,f2:text;
lc,nc,i:longint;
t,q:char;
begin
assign(f1,'text.in');
assign(f2,'text.out');
reset(f1);
rewrite(f2);
nc:=0;lc:=0;
read(f1,t);
while not eof(f1) do
begin
read(f1,q);
if (((q>='a') and (q<='z')) or ((q>='A') and (q<='Z'))) and
((t<'A') or ((t>'Z') and (t<'a')) or (t>'z')) then nc:=nc+1;
if ((q>='a') and (q<='z')) or ((q>='A') and (q<='Z')) then lc:=lc+1;
t:=q;
end;
writeln(f2,lc div nc);
close(f1);
close(f2);
end.