if(cards[k] == 0) {
Type: Posts; User: mrpeach
if(cards[k] == 0) {
Furthermore, you clearly haven't read and understood the requirements stated in the parent post. The parent specifically states:
"I'm supposed to find the smallest value among all the values....
As I said before, your approach fails if there are any duplicate values in the array.
Ok, this is getting silly. Here is what you want. Just create two same sized arrays, one with the float values, the other ints initialized to 0. Then repeatedly call this function:
int...
Quzah:
Yes, but what if there are several duplicate values...
1) Build a index array, filled with values from 0 to whatever your max index is
2) Sort the array, using the index number to dereference the value. (ie you'll only be changing the values in the...