首页 > 编程知识 正文

c语言成绩查询系统,c语言成绩转换

时间:2023-05-05 15:03:58 阅读:203841 作者:329

问题补充:

#include

#include

#define all 2

#define LED sizeof(struct face)

struct face

{

float num[6];

struct face *next;

};

int main ()

{

FILE *fp;

if ((fp=fopen("1.txt","r"))==NULL)

printf("无法打开这个文件");

struct face *p,*head;

int a,b;

p=(struct face *)malloc(LED);

//读取文件的内容

for (a=0;a

{

for (b=0;b<6;b++)

{

fscanf(fp,"%f",&p->num[b]);

}

p=p->next;

p=(struct face *)malloc(LED);

}

//输出链表的数据

for (a=0;a

{

for (b=0;b<6;b++)

{

printf("%f",head->num[b]);

}

printf("n");

}

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。