merge input and output

main
高世波 1 year ago
parent 4dfff61c02
commit e82bfd4827

@ -1,15 +0,0 @@
#include "mysyslib.h"
void Print(Student*student){
printf("%s,%s,%s,%.1lf,%.1lf,%.1lf,%.1lf\n",student->id,student->class,student->name,student->score1,student->score2,student->score3,student->score);
}
void allPrint(ss*stu){
if(stu->nums){
for(int i = 0; i < stu->nums; ++i){
Print(&stu->student[i]);
}
}else{
printf("No data exist\n");
}
}

@ -37,3 +37,18 @@ void input(ss*stu){
return; return;
} }
//输出相关
void Print(Student*student){
printf("%s,%s,%s,%.1lf,%.1lf,%.1lf,%.1lf\n",student->id,student->class,student->name,student->score1,student->score2,student->score3,student->score);
}
void allPrint(ss*stu){
if(stu->nums){
for(int i = 0; i < stu->nums; ++i){
Print(&stu->student[i]);
}
}else{
printf("No data exist\n");
}
}
Loading…
Cancel
Save