at the start user receives the size of array , memmory is being allocated, you have to fill the array with numbers etc , you also receives number x , every single element in array which is >= x/2 wont be used anymore , so i want to delete him from the array and also the array size will be decreased , how do i do that ?
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
usingnamespace std;
int main(){
int sizeofarray,x;
cin>>sizeofarray;
array = newint[sizeofarray];
cin >> x;
for (int q = 0; q < sizeofarray; q++) {
cin >> arrray[q];//filling the array
}
}