Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Java - Calculating an average with two removed values.
#7
SaptaZapta Wrote:Another problem you are having is with the initialization of "high" and "low".
You give them the values of c[0] before any values have been read in, which makes them both 0. "high" changes soon enough, but "low" will remain 0 throughout.
(You also never put the grades into the c array, which makes its entire existence superfluous).

But the grades are entered as input, which is what the loop is for. The numbers I used are just a test, they aren't preset.
Reply


Messages In This Thread
Java - Calculating an average with two removed values. - by MariettaRC - 2013-02-04, 07:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)