Pagini recente » Cod sursa (job #3177447) | Cod sursa (job #57373) | Cod sursa (job #2873782) | Cod sursa (job #2367012) | Cod sursa (job #57622)
Cod sursa(job #57622)
program text1;
var a,b:char;
nrc,lg,nr: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;
nr:=trunc(lg/nrc);
writeln(g,nr);
close(f); close(g);
end.