The Descent, can't figure out what's going on

Hey, I know a little about programming so I know how to solve the descent. Find the highest int in an array and print the mountain number that corresponds to that int. But what the heck is the array that I’m looking through? I’ve tried this is java, python, and php and my ship just sits there and explodes. I dunno, thinking bout giving up on this site. No instructions given or explanations given at all, for the first freaking level. Who designed this???

edit: figured it out, it’s super confusing how “in” is the array of all mountain heights and mountainH is getting one height and not the mountain itself. plus when I refreshed the page, some more information and instructions showed up where the debug console/output console were after i hit run test. bleh. can’t believe that took an hour.

1 Like

in is not an array. In fact, there are no arrays in the default code.

in is an object that reads from stdin, so that in.nextInt() gives you the next integer passed as input.

If you can’t understand this I’m afraid you’ll have a hard time going further. I suggest you study how Java handles input/output, so you can tackle other puzzles without getting frustrated.

In general, if you don’t understand something in the code or the problem you’re given (like what Scanner in = ... does), don’t be afraid to look it up. Most of the time you’ll learn something new that will make your life easier. :wink: