菜鸟请教!hurry up!
当我用tc编译这个程序时候,它说我有以下错误:
F:\tc\Xx.c(6) : error C2143: syntax error : missing ';' before 'type'
F:\tc\Xx.c(7) : error C2143: syntax error : missing ';' before 'type'
F:\tc\Xx.c(8) : error C2143: syntax error : missing ';' before 'type'
F:\tc\Xx.c(12) : error C2065: 'a' : undeclared identifier
F:\tc\Xx.c(12) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(12) : error C2065: 'b' : undeclared identifier
F:\tc\Xx.c(12) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(12) : error C2065: 'c' : undeclared identifier
F:\tc\Xx.c(12) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(12) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(13) : error C2106: '=' : left operand must be l-value
F:\tc\Xx.c(13) : error C2143: syntax error : missing ';' before 'if'
F:\tc\Xx.c(13) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(13) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(13) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(13) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(13) : error C2106: '=' : left operand must be l-value
F:\tc\Xx.c(14) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(14) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(15) : error C2106: '=' : left operand must be l-value
F:\tc\Xx.c(15) : error C2143: syntax error : missing ';' before 'if'
F:\tc\Xx.c(15) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(15) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(15) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(15) : error C2109: subscript requires array or pointer type
F:\tc\Xx.c(15) : error C2106: '=' : left operand must be l-value
Error executing cl.exe.不明白!
我的源代码:void main()
{int i,j,k;
i=0;
j=0;
k=0;
int a[10];
int b[10];
int c[20];
for(i=0;i<=9;i++)
for(j=0;j<=9;j++)
for(k=0;k<=9;k=k+2)
if(a[i]<=b[j])c[k]=a[i]
if(b[j]<=a[i+1])c[k+1]=b[j];
else b[j]=c[k]
if(a[i]<=b[j+1])c[k+1]=a[i];
}