Pagini recente » Cod sursa (job #1768991) | Cod sursa (job #2322940) | Cod sursa (job #1749185) | Cod sursa (job #1524048) | Cod sursa (job #486562)
Cod sursa(job #486562)
var f:text;
c,x:char;
db,szo:longint;
begin
assign(f,'text.in');
reset(f);
db:=0; szo:=0;
read(f,x);
if x in ['a'..'z','A'..'Z'] then begin inc(db); inc(szo) end;
while not eoln(f) do begin
read(f,c);
if c in ['a'..'z','A'..'Z'] then inc(db)
else if x in ['a'..'z','A'..'Z'] then inc(szo);
x:=c;
end;
close(f);
assign(f,'text.out');
rewrite(f);
if db=0 then write(f,0)
else write(f,db div szo);
close(f);
end.