PROGRAMMING:Merge arrays
Experiment 5: array
The purpose of this study was to investigate the effects of different factors on the quality of life
1. Master the definition, assignment, input and output methods of one-dimensional array and two-dimensional array.
2. Master the use of character array and string function.
Title Description
Given two ascending arrays, merge them into an ascending array and output. For example: array array1 = {3,6,13,35,54}, array array2 = {14,19,26,32},
Merge into a new array array = {3,6,13,14,19,26,32,35,54}.
###Input format:
Enter two lines of ascending integers. When 0 is entered in each line, it means the end of the input. The number of integers in each line is 1 < = n < = 10.
###Output format:
Output the merged ascending array( There is a space after the last data)
###Input example:
Here is a set of inputs. For example:
```in
3 6 13 35 54 0
14 19 26 32 0
```
###Output example:
The corresponding output is given here. For example:
```out
3 6 13 14 19 26 32 35 54
```
answer:If there is no answer, please comment
The purpose of this study was to investigate the effects of different factors on the quality of life
1. Master the definition, assignment, input and output methods of one-dimensional array and two-dimensional array.
2. Master the use of character array and string function.
Title Description
Given two ascending arrays, merge them into an ascending array and output. For example: array array1 = {3,6,13,35,54}, array array2 = {14,19,26,32},
Merge into a new array array = {3,6,13,14,19,26,32,35,54}.
###Input format:
Enter two lines of ascending integers. When 0 is entered in each line, it means the end of the input. The number of integers in each line is 1 < = n < = 10.
###Output format:
Output the merged ascending array( There is a space after the last data)
###Input example:
Here is a set of inputs. For example:
```in
3 6 13 35 54 0
14 19 26 32 0
```
###Output example:
The corresponding output is given here. For example:
```out
3 6 13 14 19 26 32 35 54
```
answer:If there is no answer, please comment