#K57732. Book Request Processing
Book Request Processing
Book Request Processing
You are given a sequence of book request IDs as integers. In the list, the integer 0 represents a termination signal and should not be counted as a valid book request. Your task is to filter out all occurrences of 0, sort the remaining numbers in increasing order, and then output the sorted list.
If there are no valid book IDs after filtering, simply output an empty line.
For example, given the input:
13 4 26 8 19 0
After filtering out 0 and sorting, the output should be:
4 8 13 19 26
Note: Input is provided via standard input (stdin) and output should be sent to standard output (stdout).
inputFormat
The input consists of a single line containing a series of integers separated by spaces. These integers represent book request IDs, where 0 is a termination signal that should be ignored.
outputFormat
Output the sorted list of valid book request IDs (i.e. all integers except 0) in a single line, separated by a single space. If there are no valid IDs, output an empty line.
## sample13 4 26 8 19 0
4 8 13 19 26