Java Program to find The Sum Of Multiple Positive Number,Stops If user Enters Negative Numbers

Get positive integers from user till user enters a negative integer. calculate sum of positive integers.

Sample Input 1:

5 6 7 2 1 8 -9

Sample Output 1:

29

Sample Input 2:

3 23 -76

Sample Output 2:

26

Program or Solution

				
			
					
			
				
			

Program Explanation


Tech Events

Hackathon