Pagini recente » Cod sursa (job #1095342) | Cod sursa (job #2867854) | Cod sursa (job #1385611) | Cod sursa (job #1985107) | Cod sursa (job #340378)
Cod sursa(job #340378)
var b,c:char;
t:text;
leng,cuv:int64;
function adevarat(c:char):boolean;
begin
adevarat:=((ord(c)>64)and(ord(c)<91))or((ord(c)>96)and(ord(c)<123));
end;
begin
assign(t,'text.in'); reset(t);
read(t,b);
while not(eof(t)) do begin
while not(eoln(t)) do begin
read(t,c);
if adevarat(c) then inc(leng)
else if adevarat(b) then inc(cuv);
b:=c;
end;
readln(t);
end;
if adevarat(c) then inc(cuv);
close(t);
assign(t,'text.out'); rewrite(t);
writeln(t,(leng div cuv));
close(t);
end.