Well, since you are looping the length of nums, and nums's length is 5, and 0 is the lowest number you can have for i, those if statements will never be true if you said:
if(i < 0)
...
if(i >...
Type: Posts; User: aussiemcgr
Well, since you are looping the length of nums, and nums's length is 5, and 0 is the lowest number you can have for i, those if statements will never be true if you said:
if(i < 0)
...
if(i >...
Ok, well the first thing that needs to be done is I need to confirm that you understand that the code:
if (nums[i] < 0)
Is checking the int inside of the i'th index of the nums array, not...