The first line of the input contains an integer length. The next line contains length space-separated
integers(1-based index). The third line contains a single integer number, denoting the position of
an element that should be removed from the vector. The fourth line contains two integers a
and b denoting the range that should be erased from the vector inclusive of a and exclusive of b.
Print the size of the vector in the first line and the elements of the vector after the two erase operations
in the second line separated by space.
Sample Input:
Enter the length of array... 5
1 2 8 6 9
2
Enter the starting and ending range of the array to erase elements...
2 4
Sample Output:
Now the size of the array is ... 2
1 9
cpp programming exercise with solution |