Pagini recente » Cod sursa (job #1027802) | Cod sursa (job #1870628) | Cod sursa (job #1557880) | Cod sursa (job #1972678) | Cod sursa (job #490198)
Cod sursa(job #490198)
program text11;
var f,g:text;
d:longint;
a,y:char;
{c:set of 'A'..'z'; }
h,l:real;
begin
{l:=0;y:=0; d:=0;}
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
y:=' ';
while not eof(f) do
begin
read(f,a);
if (ord(a)>=65) and (ord(a)<=127) then if (ord(y)>=65) and (ord(y)<=127) then
begin
end
else
if (ord(y)>=65) and (ord(y)<=127) then
d:=d+1;
y:=a;
end;
d:=d+1;
close(g);rewrite(g);
while not eof(f) do
begin
read(f,a);
if (ord(a)>=65) and (ord(a)<=127) then if (ord(y)>=65) and (ord(y)<=127) then
l:=l+1;
if trunc(l) mod 100000=0 then
begin
l:=l/d;
h:=h+l;
l:=0;
end;
end;
writeln(g,trunc(h));
close(f); close(g);
end.