下面的代码怎么样换成小数可以运行的或者上千的数字输入可以运行

#include<stdio.h> #include<stdlib.h> #define MAX 100 typedef char datatype; typedef struct { datatype elem[MAX]; int Last; }List,*SeqList; //定义顺序表类型 SeqList InitList() //初始化顺序表 { SeqList L; L=(SeqList)malloc(sizeof(List)); L->Last=-1; return L; } void CreateList(SeqList L) //创建顺序表 { int i,n; printf("请输你要创建的顺序表元素个数:"); scanf("%d",&n); printf("请输入你要创建的顺序表:"); for(i=0;i<n+1;i++) { scanf("%c",&L->elem[i]); L->Last++; } } int Location(SeqList L,datatype x) //查找某元素所在位置 { int i=0; while(L->elem[i]!=x&&i<=L->Last) i++; if(i>L->Last) return -1; else return i; } void Insertelem(SeqList L,datatype m) //插入元素 { int i,n; printf("请输入你要插入的位置 n="); scanf("%d",&n); if((L->Last+1)>MAX) printf("表已满,不能插入!"); else { L->Last++; for(i=L->Last;i>n-1;i--) L->elem[i+1]=L->elem[i]; L->elem[n]=m; } } void Deleteelem(SeqList L,datatype m) //删除表中某元素 { int i,j; i=Location(L,m); while(i==-1) { datatype n; printf("你所查找的元素不在表中,请重新输入你要删除的元素:"); scanf("%c",&n); i=Location(L,n); } for(j=i;j<=L->Last;j++) L->elem[j]=L->elem[j+1]; L->Last--; } void ShowList(SeqList L) //显示当前顺序表 { int i; printf("当前顺序表元素为:"); for(i=0;i<=L->Last;i++) printf("%c ",L->elem[i]); } void main() { int Opration; SeqList L; L=InitList(); CreateList(L); printf("输入操作:1 为删除某元素 2 为插入某元素 3 为查找某元素 4 为输出当前顺序表 5为退出\n"); scanf("%d",&Opration); while(Opration<=5) { if(Opration==1) { char n; printf("请输入你要删除的元素 n="); scanf("\n"); //1333要用这个 scanf 来读掉回车键,若没有则会影像后面的程序 scanf("%c",&n); Deleteelem(L,n); ShowList(L); system("pause"); } if(Opration==2) { char n; printf("请输入你要插入的元素 n:"); scanf("\n"); scanf("%c",&n); Insertelem(L,n); ShowList(L); system("pause"); } if(Opration==3) { datatype x; printf("请输入你要查找的元素 x="); scanf("\n"); scanf("%c",&x); printf("此元素在顺序表中的位置为(0 表示此元素不在顺序表中!):%d\n",Location(L,x)); } if(Opration==4) ShowList(L);system("pause"); if(Opration==5) break; } }