View the step-by-step solution to:

// Setup while loop while (newVa1ue O) / 'Insert new value newVa1ue in. nextlnt(); //Determine maximum value if (maxVa1ue <...

This question was created from


These calculations are not adding up correctly. With this code entered exactly as it. it shows that the total count, number of evens and offs, and the average are not correct. For example, using values of 3, -4, 5 ,12, -7 and then 0 to stop the loop. it should give values of Max - 12 Min = -7 evens = 2 odds = 3 count = 5 avg 1.8 Instead for evens, odds, count and avg it gives Evens = 2 Odds = 2 Count = 2 Avg = 2.5 I am trying to figure out exactly what I am doing wrong...


Top Answer

Sample output: 3 -4 5 12 -7 0 Max is... View the full answer


Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online