Pagini recente » Cod sursa (job #1976534) | Cod sursa (job #1168920) | Cod sursa (job #2134208) | Cod sursa (job #2690942) | Cod sursa (job #1533358)
program p2;
var s:string;
a,n,i,e,x :integer;
f,g:text;
j:real;
begin
assign (f,'text.in');
reset (f);
assign (g,'text.out');
rewrite (g);
read (f,s);
n:=1;
for i:=1 to length(s) do
If not (s[i] in ['a'..'z','A'..'Z']) then s[i]:='$';
for i:=1 to length(s) do begin
If (s[i] in ['a'..'z','A'..'Z']) and (s[i+1]='$') then
begin
for e:=i+1 to length(s) do begin
If s[e] in ['a'..'z','A'..'Z'] then x:=x+1;
end;
IF x>0 then n:=n+1
else n:=n;
end;
If s[i] in ['a'..'z'] then a:=a+1;
If s[i] in ['A'..'Z'] then a:=a+1;
end;
j:=a/n;
writeln (g,trunc(j));
close (f);
close (g);
end.