没有合适的资源?快使用搜索试试~ 我知道了~
C语言课设--教师评价系统源代码
5星 · 超过95%的资源 需积分: 49 81 下载量 130 浏览量
2016-09-14
16:09:10
上传
评论 5
收藏 6KB TXT 举报
温馨提示
试读
8页
本程序六个自定义函数和一个主函数组成,其中主函数循环调用菜单,菜单函数调用其他函数来实现要求的所有功能。在这些函数当中,插入函数,修改函数,删除函数,浏览函数,评价函数是程序的核心部分。
资源推荐
资源详情
资源评论
#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];
#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");
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");
剩余7页未读,继续阅读
资源评论
- 墨明棋妙82018-11-08很实用,感谢楼主分享
- Distf2016-09-14写得很不错
- a23524622019-06-19能告诉我怎么打开吗? 、
iamspoon
- 粉丝: 19
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功