# define N 8
void main()
{
int a[N]={43, 38, 55, 99, 72, 12, 27, 30 }, i, j, t;
printf("\nBefore sorted:\n");
for (i = 0; i < N; i++ )
printf("%5d", a[i]);
for (j = N-1; j > 0; j-- )
for (i = 0; i < j; j++)
if (a[i] > a[i+1])
{t = a[i]; a[i] = a[i+1]; a[i+1] = t;}
printf ("the sorted numbers:\n");
for (i = 0; i < N; i++ )
printf ("%d", a[i]);
printf("\n");
}
报错在第一个printf那行