急有码神人在吗?帮忙看看这段代码哪里出错了
急!!!有码神在吗?帮忙看看这段代码哪里出错了
#include<stdio.h>
#include<stdlib.h>
//#include<list>
#include <math.h>
#define L 8 //排序元素个数
#define FALSE 0
#define TRUE 1
//using namespace std;
typedef struct RecTypes
{
int key;
}RecType;
RecType R[L];
int num;
int sum;
int sun; //定义排序趟数的全局变量
void Bubblesort();
void Quicksort(int low,int high);
void Insertsort();
void Shellsort();
void Selectsort();
void Heap();
void Merge(int low,int mm,int high,int *x,int *y);
void Mergesort(); //二路归并排序
//主函数
int main()
{
RecType S[L+1];
//Seqlist S;
int i,k;
char ch1,ch2,q;
printf("\n\t\t ★排序算法实现与演示系统★\n\n\t\t请输入%d个待排序的数据:",L);
for(i=1;i<=L;i++)
{
scanf("%d",&S[i].key);
getchar();
printf("\t\t");
}
ch1='y';
while(ch1=='y')
{
printf("\n");
printf("\n\t\t 排序算法 \n");
printf("\n\t\t***********************************************\n");
printf("\n\t\t 1--------直接插入排序 \n");
printf("\n\t\t 2--------希尔排序 \n");
printf("\n\t\t 3--------冒泡排序 \n");
printf("\n\t\t 4--------快速排序 \n");
printf("\n\t\t 5--------直接选择排序 \n");
printf("\n\t\t 6--------堆排序 \n");
printf("\n\t\t 7--------归并排序 \n");
printf("\n\t\t 0--------退出 \n");
printf("\n\t\t***********************************************\n");
printf("\n\t\t请选择排序算法进行演示:");
scanf("%c",&ch2);
getchar();
for(i=1;i<=L;i++)
{
R[i].key=S[i].key;
}
switch(ch2)
{
case '1':
Insertsort();
break;
case '2':
Shellsort();
break;
case '3':
Bubblesort();
break;
case '4':
#include<stdio.h>
#include<stdlib.h>
//#include<list>
#include <math.h>
#define L 8 //排序元素个数
#define FALSE 0
#define TRUE 1
//using namespace std;
typedef struct RecTypes
{
int key;
}RecType;
RecType R[L];
int num;
int sum;
int sun; //定义排序趟数的全局变量
void Bubblesort();
void Quicksort(int low,int high);
void Insertsort();
void Shellsort();
void Selectsort();
void Heap();
void Merge(int low,int mm,int high,int *x,int *y);
void Mergesort(); //二路归并排序
//主函数
int main()
{
RecType S[L+1];
//Seqlist S;
int i,k;
char ch1,ch2,q;
printf("\n\t\t ★排序算法实现与演示系统★\n\n\t\t请输入%d个待排序的数据:",L);
for(i=1;i<=L;i++)
{
scanf("%d",&S[i].key);
getchar();
printf("\t\t");
}
ch1='y';
while(ch1=='y')
{
printf("\n");
printf("\n\t\t 排序算法 \n");
printf("\n\t\t***********************************************\n");
printf("\n\t\t 1--------直接插入排序 \n");
printf("\n\t\t 2--------希尔排序 \n");
printf("\n\t\t 3--------冒泡排序 \n");
printf("\n\t\t 4--------快速排序 \n");
printf("\n\t\t 5--------直接选择排序 \n");
printf("\n\t\t 6--------堆排序 \n");
printf("\n\t\t 7--------归并排序 \n");
printf("\n\t\t 0--------退出 \n");
printf("\n\t\t***********************************************\n");
printf("\n\t\t请选择排序算法进行演示:");
scanf("%c",&ch2);
getchar();
for(i=1;i<=L;i++)
{
R[i].key=S[i].key;
}
switch(ch2)
{
case '1':
Insertsort();
break;
case '2':
Shellsort();
break;
case '3':
Bubblesort();
break;
case '4':