Title
Program to insert new element into an existing array.
Background Context
Insert new element into an existing array
Program Specifications
Create a program to insert new element into an existing array
Function details:
1. Enter an integer array
2. Sort array in ascending and display the sorted array on the screen
3. Enter new integer value
4. Add new value entered to the sorted array in ascending order and then display new array on the screen
5. Finish program
Expectation of User interface:
The Program must have interface as below:
Please enter size of array: 5
Enter element[0]: 13
Enter element[1]: 3
Enter element[2]: 5
Enter element[3]: 10
Enter element[4]: 8
The array after sorting:
3 5 8 10 13
Please enter new value: 9
New array:
3 5 8 9 10 13
Guidelines
Restrict: When insert new element into sorted array you don’t allow sorting the array again.