#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct people{
int id;
char name[20];
char sex[5];
char title[20];//职称
char post[20];//职务
char course[20];
int score;//评分
}teacher[100];
void insert(){
int _id;
printf("Please enter teacher information\n");
printf("id = ");
scanf("%d",&_id);
if(_id > 0 &&_id < 100){
if(teacher[_id].id == _id){
printf("Teacher exist\n");
return;
}
else{
char _name[20];
char _sex[5];
char _title[20];
char _post[20];
char _course[20];
printf("name = ");
scanf("%s",_name);
printf("sex = ");
scanf("%s",_sex);
printf("title = ");
scanf("%s",_title);
printf("post = ");
scanf("%s",_post);
printf("course = ");
scanf("%s",_course);
teacher[_id].id = _id;
strcpy(teacher[_id].name,_name);
strcpy(teacher[_id].sex,_sex);
strcpy(teacher[_id].title,_title);
strcpy(teacher[_id].post,_post);
strcpy(teacher[_id].course,_course);
printf("Insert successfully\n");
}
}
else{
printf("Insert failed\n");
}
return;
}
void revise(){
int _id;
printf("Please enter teacher id\n");