in reply to find closest element of array without going over

and it works

It seems incorrect to print 100 when the input is 0. Beware backing around the corner of Perl's arrays.

Be well,
rir

  • Comment on Re: find closest element of array without going over