write a Java program that allows the users to enter in any number of non-negative integers, whitespace delimited. The user terminates the list of numbers with a negative integer. The program then should print the average of non-negative numbers entered.

Recommended Answers

All 2 Replies

Is that your assignment that you just posted?

DaniWeb Member Rules include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.