diff --git a/mysyslib.h b/mysyslib.h index 4c7ec14..04adab5 100644 --- a/mysyslib.h +++ b/mysyslib.h @@ -1,6 +1,7 @@ #include #include #include +#include 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*); diff --git a/operations.c b/operations.c index 1e7e81d..12c8568 100644 --- a/operations.c +++ b/operations.c @@ -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; }