冒泡法排序问题,没错误,没警告,但就是没正确结果,请大侠们帮忙看看
#include<stdio.h>main()
{
unsigned char i,j;
unsigned char t,shu[10];
printf("please input 10 numbers.");
printf("\n");
for(i=1;i<=10;i++)
{
scanf("%d",&shu[i]);
}
printf("\n");
for(j=1;j<=9;j++)
{
for(i=1;i<=10-j;i++)
{
if(shu[i]>shu[i+1])
{
t=shu[i];
shu[i]=shu[i+1];
shu[i+1]=t;
}
}
}
printf("the sorted numbers:");
for(i=1;i<=10;i++)
printf("%d,",shu[i]);
printf("\n");
}