Elisabeth Ibeh wrote:means the the length starts from 1 to (N+256)/2
Yes, but I think what's being asked is: what is N? For the purposes of the loop is it a constant, or can it change while the loop is in progress?
Either way, assuming that the loop is working with a counter, it could easily be something like:however, 'k' could just as well be a float or a double if you need it to be.
You should also understand the difference between integer and floating-point division, because if n (and in Java, by convention, it's 'n', not 'N') is an integer type, it will behave differently from if it's a floating-point type.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here