#include<stdio.h>
#include<malloc.h>

struct bmi {
  char name[100];  /* 氏名 */
  double height;  /* 身長 */
  double weight;  /* 体重 */
  double bmi;
};

int count_number(FILE *fp)
struct bmi *alloc_bmi_array(FILE *number)
int main (void)
{
    char FILENAME[100];
    FILE *fp;
    int number;
    struct bmi *bmis;

    scanf("%s",FILENEME);
    if((fp = fopen(FILENAME,'r')==NULL){
    fprintf(stderr,"%s cannot be opened!\n",FILENAME);
    retrun 1;
    }

    number = count_number(fp);//データの数を数える
    bmis= allocate_bmi_array(number);//
      // (struct bmi *) malloc(sizeof(struct bmi ) *number)
    read_data(fp,bmis);
    b_sort(bmis);
    display(bmis);

    fclose(fp);
    return 0;
}

int count_number(FILE *fp){
    int n;
    char namme[100];
    float height,weight;
    n=0;
    while(fscanf(fp,"%s %f %f",name,&height,&weight)!=EOF){
        n++;
    }
rewind(fp);
    return n;
}

struct bmi
    malloc(sizeof(struct bmi ) * number)