{"佐藤", 41, 189, 97},
{"鈴木", 22, 178, 61},
{"高橋", 47, 178, 80},
{"田中", 14, 180, 80},
{"渡辺", 33, 192, 94},
{"伊藤", 12, 150, 51},
{"山本", 55, 185, 98},
{"中村", 17, 170, 88},
{"小林", 35, 187, 77},
{"加藤", 49, 179, 91},
{"吉田", 36, 182, 61},
{"山田", 44, 184, 71},
{"佐々木", 15, 151, 81},
{"山口", 50, 188, 93},
{"松本", 17, 178, 68},
{"井上", 13, 144, 81},
{"斎藤", 17, 163, 55},
{"木村", 23, 175, 105},
{"林", 29, 161, 79},
{"清水", 49, 185, 102},
{"山崎", 40, 187, 99},
{"森", 34, 189, 80},
{"阿部", 50, 183, 81},
{"池田", 37, 186, 97},
{"橋本", 15, 185, 83}
のようになっています
どこが間違っているのか教えてください
#include<stdio.h>
#include<stdlib.h>
typedef struct {
char name[10];
int age;
int stature;
int weight;
} keisoku;
keisoku a[25];
main(){
FILE *fp;
char filename[10];
printf("ファイル名を入力して下さい\n");
scanf("%s",filename);
int n;
if(( fp=fopen( filename, "r" ))==NULL ) {
fprintf ( stderr, "File open error\n" ); exit( 1 );
}
fscanf( fp, "%d", &n );
int Age[25];
double Stature[25], Weight[25];
int i;
for(i = 0; i < 25; i++){
Age[i] = a[i].age / 10;
Stature[i] = a[i].stature;
Weight[i] = a[i].weight;
}
double sumstature[5], sumweight[5];
int num[5];
int k,l,j;
for(l = 1; l <= 5; l++){
for(k = 0; k < 25; k++){
if(Age[k] == l){
sumstature[l-1] = Stature[k] + sumstature[l-1];
sumweight[l-1] = Weight[k] + sumweight[l-1];
num[l-1]++;
}
}
}
for(j = 0; j < 5; j++){
sumstature[j] = sumstature[j]/num[j];
sumweight[j] = sumweight[j]/num[j];
}
int astature[5],aweight[5];
int m;
for(m = 0; m < 5; m++){
astature[m] = 10*sumstature[m];
sumstature[m] = astature[m]/10;
aweight[m] = 10*sumstature[m];
sumweight[m] = aweight[m]/10;
}
int o;
for(o = 0; o < 5;o++){
printf("%d0代の平均身長は%.1f,平均体重は%.1fです.\n",o + 1,sumstature[o],sumweight[o]);
}
fclose( fp );
}