int grades[14]={0};
float total=0;
float average=0;
float deviation[14]={0.0};
int i=0;
for(i;i<14;i++)
{
printf("Please input a grade:");
scanf("%d",grades[i]);
total+=grades[i];
}
average=total/14;
for(i=0;i<14;i++)
{
deviation[i]=grades[i]-average;
}
printf("------ ------");
for(i=0;i<14;i++)
{
printf("%4d%10f\n",grades[i],deviation[i]);
}
额,我只是把关键部分写出来