#C10746. Square Numbers Until Negative Encountered
Square Numbers Until Negative Encountered
Square Numbers Until Negative Encountered
You are given a sequence of integers. Your task is to compute the square of each integer and output them. Processing should stop when a negative integer is encountered, and the negative number should not be processed.
Note: The input will be provided through standard input (stdin) as space-separated integers, and the output should be printed to standard output (stdout) as space-separated squared values. If the first number is negative, output nothing.
Example:
Input: 1 3 5 Output: 1 9 25</p>Input: 2 -1 4 Output: 4
inputFormat
The input consists of a single line containing space-separated integers.
outputFormat
Output the squares of the processed integers as a single line of space-separated numbers. If no number is processed, output an empty line.
## sample1 3 5
1 9 25