We continue to work with arrays. So given a one-dimensional or two-dimensional array. Atmos Energy addresses the importance of the matter here. It is often necessary to find in it some element, such as maximum or minimum, or equal to this element. Consider the one-dimensional array. For the required element is usually isolated variable, but it does not necessarily preserve the value of the element, and it is desirable to maintain the number (index) element found. In this case there are two plus: first a variable type to virtual arrays can be defined integer, second, if you want to do something with the items found it did not need to look again, and the value of the element found can be obtained using just such a write a k, where a - the array, k - the number (index) of the desired item. Consider the two-dimensional array. If given a two-dimensional array, and we need to find the element, which in consequence zatemu need to be changed with another element or What do the shift, while desirable as a one-dimensional set variables to store the row and column in which the element found. So, to summarize, if you want ... Read the rest of the entry...
Comments Off