fix:some bugs

main
高世波 1 year ago
parent 7295cf1158
commit 3959ea64b0

@ -1,6 +1,7 @@
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdlib.h>
typedef struct{
char *id;
@ -17,11 +18,7 @@ typedef struct{
int nums;
}ss;
ss* init(int);
Student* newStudent();
void stucpy(Student* dest, Student* src);
void stuswp(Student* fi, Student* se);
int mainMenu(ss *stu);
ss* init(int)
void ModifyInfo(ss* stu);
void getCom(ss*);
void Print(Student*);

@ -49,9 +49,9 @@ void input(ss*stu){
stu->student[pst].score = stu->student[pst].score1 + stu->student[pst].score2 + stu->student[pst].score3;
stu->nums++;
printf("continue?\n");
printf("continue?(y/n)\n");
scanf("%s",tmp);
}while(!strcmp(tmp,"yes"));
}while(!strcmp(tmp,"y"));
return;
}
@ -164,11 +164,11 @@ void ModifyInfo(ss *stu)
}
int class = atoi(min);
class++;
itoa(class,min,10);
sprintf(min,"%d",class);
} while (strcmp(max, min) >= 0);
printf("continue?\n");
printf("continue?(y/n)\n");
scanf("%s", tmp);
}while (!strcmp(tmp, "yes"));
}while (!strcmp(tmp, "y"));
return;
}

Loading…
Cancel
Save