c语言程序错误求大神改错

qq_41891879 qq_41891879 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
#include<stdio.h>
#include<stdlib.h>
typedef struct
{
int data[100];
int length;
}sequenlist;
int main()
{
void creat(sequenlist *L);
void show(sequenlist *L);
void find(sequenlist *L);
void insert(sequenlist *L);
void Delete(sequenlist *L);
void sort(sequenlist *L);
void inversed(sequenlist *L);
sequenlist *L,a;
L=&a;
creat(L);
show(L);
find(L);
insert(L);
show(L);
Delete(L);
show(L);
sort(L);
show(L);
inversed(L);
show(L);
return 0;
}
void creat(sequenlist *L)
{
printf("Input the lenght of the list L:\n");
int j=0;
scanf("%d",&L->length);
printf("Input the contennt:\n");
for(j;j<L->length;j++)
scanf("%d",&L->data[j]);
}
void show(sequenlist *L)
{
int j=0;
printf("Output the list and its length:\n");
for(j;j<L->length;j++)
printf("%d",L->data[j]);
printf("\n");
printf("the lenght is %d\n",L->length);
printf("\n");
}
void find(sequenlist *L,int n)
{
int a,m,j;
printf("please enter the number you want to find:\n");
scanf("%d",&a);
m=0;
for(j=0;j<L->length;j++)
{if(L->data[j]==a)
{printf("the number is %d\n",L->data[j]);
printf("it's the %d number\n",m);}
else
m=m+1;
}
}
void insert(sequenlist *L)
{
int i,j,e;
printf("please enter the place you want to insert:\n");
scanf("%d",&i);
printf("please enter the number:\n");
scanf("%d",&e);
if((i<1)||(i>L->length+1))
printf("error\n");
j=L->length;
if(j;j>i-1;j--)
L->data[j+1]=L->data[j];
L->data[i-1]=e;
++L->length;
}
error C2143: syntax error : missing ')' before ';'
(75) : warning C4390: ';' : empty controlled statement found; is this the intent?
(75) : warning C4552: '>' : operator has no effect; expected operator with side-effect
(75) : error C2059: syntax error : ')'
(76) : error C2146: syntax error : missing ';' before identifier 'L'
执行 cl.exe 时出错.

1.obj - 1 error(s), 0 warning(s)
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
qq_41891879
C语言 70,040 成员 243,237 内容