PROGRAMMING:insert data
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
In an ascending sequence, insert a number and keep the sequence ascending.
###Input format:
Enter an integer n, and then enter the ascending sequence composed of N numbers; Finally, enter the integer to insert. 1<=n<=50。
###Output format:
Output a new ascending sequence( When output, the field width of each number is 4)
###Input sample 1:
Here is a set of inputs. For example:
```in
two
1 6
0
```
###Output sample 1:
The corresponding output is given here. For example:
```out
0 1 6
```
###Input sample 2:
Here is a set of inputs. For example:
```in
five
1 3 4 6 7
two
```
###Output sample 2:
The corresponding output is given here. For example:
```out
1 2 3 4 6 7
```
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
In an ascending sequence, insert a number and keep the sequence ascending.
###Input format:
Enter an integer n, and then enter the ascending sequence composed of N numbers; Finally, enter the integer to insert. 1<=n<=50。
###Output format:
Output a new ascending sequence( When output, the field width of each number is 4)
###Input sample 1:
Here is a set of inputs. For example:
```in
two
1 6
0
```
###Output sample 1:
The corresponding output is given here. For example:
```out
0 1 6
```
###Input sample 2:
Here is a set of inputs. For example:
```in
five
1 3 4 6 7
two
```
###Output sample 2:
The corresponding output is given here. For example:
```out
1 2 3 4 6 7
```
answer:If there is no answer, please comment