删除顺序表中指定区间的数据
#include <iostream>
#include <cstdlib>
using namespace std; int main()
{
int *data, n, x, y;
cin>>n; data = (int*)malloc(n*sizeof(int)); for (int i = ; i < n; ++i)
{
cin>>data[i];
} cin>>x>>y;
int k = ; for (int i = ; i < n; ++i)
{
if(data[i] <= y && data[i] >= x)
{
continue;
}
data[k++] = data[i];
} for (int i = ; i < k; ++i)
{
cout<<data[i]<<" ";
}
return ;
}