首页 >> 百科精选 >

c++学生综合测评系统(学生综合测评系统c语言代码)

2024-03-10 00:18:53 来源: 用户: 

今天凤捷来为大家解答以上的问题。c++学生综合测评系统,学生综合测评系统c语言代码相信很多小伙伴还不知道,现在让我们一起来看看吧!

1、#include #include typedef struct stu{ int id; char name[40]; int mark[4]; float total; } STU; int id; int m1,m2,m3,m4; char str[40]; void main() { int i,j,N=0; FILE *fin, *fout; STU tmp; STU *s; fin = fopen("score.txt","r"); while (1){ if ( fscanf(fin,"%*d %*s %*d %*d %*d %*d") ==EOF) break; N++; } fclose(fin); s = (STU *) malloc(N * sizeof(STU)); if (!s) { printf("no enough memory for STU"); exit(0); } fin = fopen("score.txt","r"); for (i=0;i s[i].total){ tmp = s[j]; s[j]=s[i];s[i]=tmp; }; }; }; fout = fopen("score_Q.txt","w"); for(i=0;i

今天为大家分享到这里,希望小伙伴们会有帮助。

  免责声明:本文由用户上传,与本网站立场无关。财经信息仅供读者参考,并不构成投资建议。投资者据此操作,风险自担。 如有侵权请联系删除!

 
分享:
最新文章