Pagini recente » Cod sursa (job #180240) | Cod sursa (job #386101) | Cod sursa (job #2805910) | Cod sursa (job #1760611) | 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.