Yes, the output is correct, I have tested the second part too, and more than one division has appeared in a quarter. I somehow believe this works because of the way I setup the new array-variable -...
Type: Posts; User: SOG
Yes, the output is correct, I have tested the second part too, and more than one division has appeared in a quarter. I somehow believe this works because of the way I setup the new array-variable -...
I solved the problem with something else to consider: one different array variable, and one new loop-control variable Here is how it works in code...
// Use these nested-loops...
I thought I made the highestQuart-variable an accumulator and now I realize that it does work as a non-accumulator, but I believe they don't all print because 3 more variables are needed to store the...
I answered each question one at a time.
I have, and I believe it has to do with the way I declared highestQuart - as an accumulator, somehow - so I need help with that. Now I think I may have to...
I remember two important things you said...
...and...
So, I wrote this...
I did that part as well with this setup below...
// Use these nested-loops to display the highest sales-division for a quarter.
for (int rows = 0; rows <...
I did what you told me to do...
// Use these nested-loops to display the highest sales-division for a quarter.
for (int rows = 0; rows < QUARTERS; rows++)
...
The information given to me was that the if-statement worked 3 times, but that something I haven't identified in the if-statement stopped it from printing a 4th one. Maybe it was a newline-statement...
I typed in a println-statement that says "Statement printout here." and it appeared 3 times in a row.
I haven't solved the problem yet, but I have made some adjustments. Up in the higher-part of the program, I've tried to follow or copy (to an extent) what my textbook was saying about...
I notice what you mean - it was because of a typo in my text editor. I used the last code-setup I gave you and this output came out...
Highest sales-division for Quarter-
I see your point. I tried to do what you said and set this code below up...
// Use these nested-loops to display the highest sales-division for a quarter.
for...
Just to be sure, what problem is that?
I notice what you told me and I did this somehow figuring out that I was using an accumulator as a highest-number variable in this case. I believe I confused the computer out of the confusion of...
Right now, the code displays this...
Highest sales-division for Quarter-1: D-5
Highest sales-division for Quarter-2: D-3
Highest sales-division for Quarter-4: D-3
...instead of what it is...
I did what you told me to do and understood you - along with some editing on my part because of an article I read on this website. Now what?
The first part is the needed output with a missing part: the 3rd-quarter answer. The second part is the code itself, with only the indicated problem-area.
Highest sales-division for Quarter-1:...