请大家帮忙这个简单的程序哪里有问题
#include <stdio.h>#define M 10
int main (void)
{
int shu[M],
i;
double y,sum;
for(i=0;i<M;++i)
{
scanf("%d",shu[i]);
}
sum = 0.0;
for(i=0;i<M;++i)
{
sum += shu[i];
}
printf("n % of total\n");
for(i=0;i<M;++i)
{
y = shu[i] / sum * 100;
printf("%2d %11.2f\n",shu[i],y);
}
return 0 ;
}