J Hiddleston wrote:
John Matthews wrote:Hi J - is it that you don't understand (1) what it is you have to do, or (2) how to do it?
I worked on it some more, and thought I had found a way to make it work for these two searches, but am not getting the correct values. Any ideas why?
John Matthews wrote:Hi J - is it that you don't understand (1) what it is you have to do, or (2) how to do it?
If it's (2) then have you got some code to show us how far you've got? That would make it a lot easier for us to help.
Campbell Ritchie wrote:No, he means the forum. Nil desperandum; I shall move you to our C forum in a few seconds.
Tim Holloway wrote:
J Hiddleston wrote:This shows it is posted in Java but I cant seem to change it?
Are you referring to the code tags? That's no problem. The option on the code tag just tells us how to colorize the display and Java and C and C++ are all similar enough to use basically the same option.
Tim Holloway wrote:C is not java. If you don't set an initial value on a variable, chances are you will get garbage. Garbage shifted is still garbage.
Junilu Lacar wrote:Wouldn't an "example of how to do this" actually be doing the work for you? People usually post the code they've written and ask for feedback. What have you tried so far?
Stephan van Hulst wrote:You're splitting the string on space characters, but your input doesn't contain spaces.
Chris R Olsen wrote:Hi, Joel --
The mathematician in me says that you have not adequately coded what you mean by the lowest possible index. All your code does is find the max number. If what you want is the lowest possible index that is one of many that have the max value, you need to add that in your loop. Perhaps have the loop iterate _DOWN_ and say,...
-- Chris