#K67797. Sum of Positive Integers
Sum of Positive Integers
Sum of Positive Integers
You are given a list of integers. Your task is to compute the sum of all the positive integers in the list. Negative numbers and zeros should be ignored. If there are no positive integers in the list, then the output should be 0
.
The input will be provided on a single line as space-separated integers. Make sure to handle the case when the input is empty.
inputFormat
Input is given via standard input (stdin) as a single line containing space-separated integers. If no integers are provided, consider it as an empty list.
outputFormat
Output via standard output (stdout) the sum of all positive integers from the input. If there are no positive integers, output 0.## sample
1 -2 3 4 -5
8