
480 Programming and Data Structures
The va*?ue of m is initially zero. The sum obtained is again subtracted from m. This is because if
negative numbers are entered, they are to be considered in the sorting. For example, the value of
sum=20. In real execution, the sum may be different depending on integers entered.
Value of m would be m= - 20 (as pre m = m - 20 when m = 0).
Thus, in the while loop value of m varies from -20 to 20. In this range, all the entered elements are
covered. The value of m changes from -20 to 20, that is, -20, -19 upto +20 in ascending order. Thus,
the same order is applied while saving elements in array C[].
14.1