This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hello, I wrote this code that takes values as input from a user until a negative number is entered, and then prints the average of those values, not including the negative number.
I need to figure out how to not print an average if the first number a user inputs is negative. I think I should "throw an exception," but I'm not really sure how to go about that.