Question: in java : Write a program that collects any number of non - negative integer inputs and calculates the sum of the values. A negative
in java : Write a program that collects any number of nonnegative integer inputs and calculates the sum of the values. A negative integer should end the input collection and is not part of the sum.
Output the smallest nonnegative value and the sum of the nonnegative input values, ending with a newline. Ensure your program output matches the example formatting below and works for a variety of input values.
If the input is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
