Pagini recente » Cod sursa (job #814349) | Cod sursa (job #2514823) | Cod sursa (job #518699) | Cod sursa (job #3273068) | Cod sursa (job #41810)
Cod sursa(job #41810)
var f1,f2:text;
t:string;
lc,nc,i:longint;
begin
assign(f1,'text.in');
assign(f2,'text.out');
reset(f1);
rewrite(f2);
readln(f1,t);
nc:=0;lc:=0;
for i:=1 to length(t) do
begin
if (((t[i]>='a') and (t[i]<='z')) or ((t[i]>='A') and (t[i]<='Z'))) and
((t[i-1]<'A') or ((t[i-1]>'Z') and (t[i-1]<'a')) or (t[i-1]>'z')) then nc:=nc+1;
if ((t[i]>='a') and (t[i]<='z')) or ((t[i]>='A') and (t[i]<='Z')) then lc:=lc+1;
end;
writeln(f2,lc div nc);
close(f1);
close(f2);
end.