#K75712. Cumulative Sum Array
Cumulative Sum Array
Cumulative Sum Array
Given a sequence of integers, compute the cumulative sum of the sequence. The cumulative sum of an array \( [a_1, a_2, a_3, \dots] \) is defined as \( S_i = \sum_{j=1}^{i} a_j \). In other words, each element of the output array is the sum of itself and all previous elements of the input array.
Your task is to read a line of space-separated integers from standard input, compute their cumulative sums, and output the resulting sequence as space-separated numbers to standard output. If the input is empty, output nothing.
inputFormat
The input is provided via standard input. It consists of a single line with space-separated integers. An empty line represents an empty list.
outputFormat
The output should be printed to standard output as a single line of space-separated integers representing the cumulative sums. If the input is empty, the output should also be empty.
## sample1 2 3 4
1 3 6 10
</p>