c语言数据结构--希尔排序

#include
#include
#include
#include
using namespace std;
#define Max 11
int main(){
	int length;
	cout<<"input the length:";
	cin>>length;
	int data[length+1];
	cout<<"input the array:";
	for(int i=1;i<=length;i++){
		int a;
		cin>>a;
		data[i]=a;
	}
	int d;
	cout<<"input the d -1 stop"<>d;
	while(d!=-1){
		for(int j=1;j<=d;j++){
			int data2[length];
			int k=0;
		for(int i=j;i<=length;i+=d){
			data2[++k]=data[i];
		}
	
		for(int o=1;o>d;
	}
}
//49 38 65 97 76 13 27 49

你可能感兴趣的:(数据结构,c语言,c++)