c# - Populate 2Dimensional Array -
I am trying to write some arguments which allow me to store values in a 2 dimensional array. Under the function given below, I would like to store current Function: If there is another way that this can be done, please provide suggestions. Keeping in mind, I can not use anything from collection classes. All answers are appreciated. As discussed, it may be a bit difficult to follow - what is the code given below for you are seeing? coins [i] value stored in the form of a consolidated
coin variable. However, I am not sure how I can do this. The reason for this happening is that I would like to loop through the array when it will be populated once and print current
coins [i] with the corresponding
coin variable Which indicates the amount to be used to deliver the change.
int counter = 0; Int Coin; For (int i = 0; i & lt; coins; album; i ++) {coin = math.min (quantity [i], (int) (change / coin [ii])); Counter + = coin; Change - = coin * coins [i]; // [Coins [i], coin] console want to be stored in 2Darray. Wrightite ("number of coins = {0}", counter);
Suppose that the definition of 'array' is no more int counter = 0; Int Coin; Int [] change_given = new int [coins.Length]; // will be the same length as 'coins' (int i = 0; i
Comments
Post a Comment