Pagini recente » Cod sursa (job #1641647) | Cod sursa (job #292254) | Cod sursa (job #707862) | Cod sursa (job #1397689) | Cod sursa (job #525749)
Cod sursa(job #525749)
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:=1;
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,round(n/s));
close(f);
end.