Pagini recente » Cod sursa (job #2407889) | Cod sursa (job #1249783) | Cod sursa (job #1756208) | Cod sursa (job #2093851) | Cod sursa (job #248796)
Cod sursa(job #248796)
program ptext;
var f,g:text;
c1,c2:char;
l,nrcuv,rez:longint;
function lit(x:char):boolean;
begin
if((x>='a')and(x<='z'))or((x>='A')and(x>='Z')) then lit:=true
else lit:=false;
end;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
l:=0;
nrcuv:=0;
read(f,c2);
if lit(c2) then inc(l);
repeat
c1:=c2;
read(f,c2);
if(lit(c1) and lit(c2)=false) then inc(nrcuv);
if(lit(c1))and(lit(c2)) then inc(l);
until eof(f);
rez:=(l+10) div (nrcuv+10);
write(g,rez);
close(f);
close(g);
end.