Pagini recente » Cod sursa (job #1231061) | Cod sursa (job #692107) | Cod sursa (job #2818288) | Cod sursa (job #2289910) | Cod sursa (job #525752)
Cod sursa(job #525752)
type litere=set of char;
var c,b:char;
a:litere;
n,s:integer;
f:text;
begin
a:=['A'..'Z','a'..'z'];
assign(f,'text.in');
reset(f);
n:=0;
s:=0;
c:=' ';
while not eof(f) do
begin
b:=c;
read(f,c);
if c in a then inc(n) else if b in a then inc(s);
end;
close(f);
if c in a then inc(s);
assign(f,'text.out');
rewrite(f);
write(f,n div s);
close(f);
end.