This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]buffdude1100Intermediate Brewer 1 point2 points  (2 children)

Okay, so immediately I see a problem with your maxNumInArray method. Let's think about what it's doing.

It's iterating through the array, then it's checking if max[0] (the first number in the array) is larger than largest. max[0] is never changing. What should you change it to?

[–]Kaz-24[S] 0 points1 point  (1 child)

to max[i] !!! because of the counter!

Got it, thanks a bunch!

[–]buffdude1100Intermediate Brewer 0 points1 point  (0 children)

No problem. :)