# include <stdio.h>
# include <stdlib.h>
struct soccer
{
int num;
char fname[20];
char lname[20];
int shangchang;
int jizhong;
int zoulei;
int dadian;
float anda;
};
int main(int argc, char * argv[])
{
int i = 0;
FILE * fp;
struct soccer player[19];
fp = fopen(argv[1], "r");
while (!feof(fp))
{
fscanf(fp, "%d%s%s%d%d%d%d", &player[i].num, player[i].fname, player[i].lname,
&player[i].shangchang, &player[i].jizhong, &player[i].zoulei, &player[i].dadian);
i++;
}
for (int i = 0; i < 18; i++)
{
printf("%d %s %s %d %d %d %d\n", player[i].num, player[i].fname, player[i].lname,
player[i].shangchang, player[i].jizhong, player[i].zoulei, player[i].dadian);
}
fclose(fp);
return 0;
}
10-25
743
08-25
1168