Pagini recente » Cod sursa (job #3225563) | Cod sursa (job #2568989) | Cod sursa (job #2660569) | Cod sursa (job #552520) | Cod sursa (job #1420299)
program text1;
var c1,c2:char;
n,i,j,nr:longint;
f1,f2:text;
begin
assign (f1,'text.in');
assign (f2,'text.out');
reset (f1);
rewrite (f2);
read(f1,c2); c1:='0'; nr:=0; j:=0;
while not eof(f1) do begin
if (not (c1 in ['a'..'z','A'..'Z'])) and (c2 in ['a'..'z','A'..'Z']) then nr:=nr+1;
if c1 in ['a'..'z','A'..'Z'] then j:=j+1;
c1:=c2; read(f1,c2);
end;
if c1 in ['a'..'z','A'..'Z'] then j:=j+1;
writeln (f2,j div nr);
close (f1);
close (f2);
end.