大家给我看看
#include <stdio.h>int mian ()
{
int i, j, t, a[10];
printf ("input 10 number: \n");
for (i = 0;i < 10; i++)
{
scanf ("%d", &a[i]);
}
printf ("\n");
for (j = 0; j < 9 ; j++)
{
for (i = 0 ; i < 9 - j; i++)
{
if (a [i] >a [a+1] )
{
t = a[i]; a[i] = a[i+1]; a[i+1] = t;
}
}
printf ("the sorted number: \n");
}
printf ("\n");
return 0;
}
——————————————————————————————————————————————
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.c
C:\Windows\System32\1.c(16) : error C2107: illegal index, indirection not allowed
C:\Windows\System32\1.c(16) : warning C4047: '>' : 'int ' differs in levels of indirection from 'int *'
Error executing cl.exe.
1.obj - 1 error(s), 1 warning(s)