【文章內(nèi)容簡(jiǎn)介】
newnode=(Pointer)malloc(sizeof(Seqlist))。newnoderesult=mystack。newnodeNext=NULL。rNext=newnode。r=newnode。mystack=Pop_Stack(mystack)。j++。 }else if(Add_Stack(mystack)+b[j]k){ j++。}} }return p。} void Print_List(Pointer p){int i,j=0。p=pNext。printf(wele the outer\n)。if(p==NULL)printf(there no results\n)。while(p!=NULL){ j++。printf(the %d result is: ,j)。for(i=0。i=p。i++){ printf( %d,p[i])。}p=pNext。printf(\n)。}printf(\n)。}void Sort_Array(int b[],int n){int i,j,temp。for(i=0。in。i++){for(j=0。jni。j++){ if(b[j]b[j+1]) {temp=b[j]。b[j]=b[j+1]。b[j+1]=temp。 }}} }void main(){int i,n,k,select,a[Max]。Pointer head。printf(******************************************\n)。printf(1 start\n2 exit\n)。 scanf(%d,amp。select)。 while(select==1){printf(please input the total products\n)。scanf(%d,amp。n)。printf(please input the volumn of n products\n)。for(i=0。in。i++){printf(please input the %d integers,i+1)。scanf(%d,amp。a[i])。}printf(\n)。printf(please input the volunm to put\n)。scanf(%d,amp。k)。Sort_Array(a,n)。16