Pagini recente » Cod sursa (job #1129181) | Cod sursa (job #2957616) | Cod sursa (job #2524988) | Cod sursa (job #2389832) | Cod sursa (job #57619)
Cod sursa(job #57619)
program text1;
var a,b:char;
nrc,lg:longint;
f,g:text;
function litera(x:char):boolean;
begin
litera:=false;
if (x>='a')and(x<='z')or(x>='A')and(x<='Z') then litera:=true;
end;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
read(f,b);
lg:=0;
if litera(a) then lg:=1;
while not eof(f) do
begin
a:=b;
read(f,b);
if litera(b) then lg:=lg+1;
if litera(a)and not litera(b) then nrc:=nrc+1;
end;
writeln(g,trunc(lg/nrc));
close(f); close(g);
end.