资源简介
这是一个管理系统,实现教师信息和学生的成绩管理
代码片段和文件信息
#include “tea_stu.h“
void welcome(){
printf(“\t*************************************************************\n“);
printf(“\t\t\t\t**教师信息管理/学生成绩管理系统**\n\t\t\t\t 欢迎使用!\n“);
printf(“\t*************************************************************\n“);
}
int menu_select_tea()
{
char c;
printf(“0.Exit the system\n1.See teacher record\n2.Add teacher record\n3.Adjust teacher record\n5.Find teacher record\n4.Open the file\n“);
printf(“please input 1-5 to select related function or 0 to exit!!!\n“);
c=getchar();
getchar();
return(c-‘0‘);
}
void add_tea(Teacher tea[])
{
int i=0jnum;
char str[5];
if(numtea!=0)
{
printf(“cover the current record?(y/n)\n“);
gets(str);
if(str[0]==‘Y‘||str[0]==‘y‘)
i=0;
else i=numtea;
}
printf(“Please input the number of you add the teachers:“);
scanf(“%d“&num);
if(i==0)
numtea=num;
else numtea+=num;
if(numtea>lens)
{
lens+=10;
tea=(Teacher *)realloc(tealens*SIZE);
}
printf(“Please input the teacher‘s info:\n“);
for(;i {
getchar();
printf(“please input the teacher‘s NO.:“);
gets(tea[i].number);
printf(“please input the teacher‘s name:“);
gets(tea[i].name);
printf(“please input the teacher‘s sex(man/woman 0/1):“);
gets(tea[i].sex);
if(tea[i].sex[0]==‘0‘) strcpy(tea[i].sex“man“);
else strcpy(tea[i].sex“woman“);
printf(“please input the teacher‘s address:“);
gets(tea[i].addr);
printf(“the teacher is married(No/Yes 0/1):“);
gets(tea[i].married);
if(tea[i].sex[0]==‘0‘) strcpy(tea[i].sex“No“);
else strcpy(tea[i].sex“Yes“);
}
display_tea(tea0numtea-1);
getchar();
}
void display_tea(Teacher tea[]int n1int n2)
{
int i;
char str[2];
if(numtea==0){
printf(“There is Nothing!\n“);
printf(“Do you want to open some file to find the record?(Y/N)\n“);
gets(str);
if (str[0]==‘Y‘||str[0]==‘y‘)
{
openfileTXT(tea);
}
else
{
return;
}
}
else
{
for(i=n1;i<=n2;i++)
printf(“number:%s\tname:%s\t\tsex:%s\t\taddr:%s\t\tmarried:%s\t“tea[i].numbertea[i].nametea[i].sextea[i].addrtea[i].married);
}
}
void adjust(Teacher tea[])
{
char str[5];
int i=-1j;
if(numtea==0)
{
printf(“there is nothing !!!\n“);
return;
}
while(i<0)
{
i=find_tea(tea);
if(i>=0)
{
printf(“Delete it?(y/n)“);
gets(str);
if(str[0]==‘y‘||str[0]==‘Y‘)
{
delete_tea(teai);
/*count(stud); */
}
else
{
printf(“Adjust it?(y/n)“);
gets(str);
if(str[0]==‘y‘||str[0]==‘Y‘)
{
printf(“Please input something you want:\n“);
printf(“please input the teacher‘s NO.:“);
gets(tea[i].number);
printf(“please input the teacher‘s name:“);
gets(tea[i].name);
printf(“please input the teacher‘s sex(man/woman 0/1):“);
gets(tea[i].sex);
if(tea[i].s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 57856 2013-03-28 15:15 Teacher_Student_Manager\Debug\Teacher_Student_Manager.exe
文件 311172 2013-03-28 15:15 Teacher_Student_Manager\Debug\Teacher_Student_Manager.ilk
文件 502784 2013-03-28 15:15 Teacher_Student_Manager\Debug\Teacher_Student_Manager.pdb
文件 20 2013-03-28 14:32 Teacher_Student_Manager\Teacher_Student_Manager\bz.txt
文件 886 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\cl.command.1.tlog
文件 2216 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\CL.read.1.tlog
文件 752 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\CL.write.1.tlog
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 1678 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 2450 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 980 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\li
文件 775 2013-03-28 09:03 Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.Build.CppClean.log
文件 118 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.lastbuildstate
文件 38507 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.log
文件 91354 2013-03-28 15:15 Teacher_Student_Manager\Teacher_Student_Manager\Debug\tea_stu.obj
............此处省略17个文件信息
- 上一篇:利用51单片机产生可调PWM波
- 下一篇:王永庆 人工智能 第3章 参考答案
相关资源
- ADXL345模块 51程序
- 单片机频率计数器
- 编译原理课程设计:基于表达式的计
- lzw压缩与解压
- PID C 语言算法DSP2812PWM
- 班级档案管理系统
- C 程序设计学生宿舍管理系统
- TDC-GP2激光测距应用
- XX管理系统
- 中南民大数据结构-八皇后问题含实验
- 电磁环岛相关资料.zip
- 人机交互实验-命令行菜单界面
- 中缀表达式求值
- 基于DSP的语音录放实验程序
- 一个随笔画程序
- 标准C实现FTP上传功能
- 中南大学单片机课设 密码锁
- 交通灯控制系统
- funcode坦克大战源码
- 数据结构与算法全集C源代码+详细注释
- Open62541 win32 动态库
- Proteus8.9 VSM Studio WINAVR编译器仿真ATM
- 温度测试代码加仿真图protues
- 截图、抓屏程序纯C实现
- C代码版本的HTTP POST上传文件/JSON
- 图书管理系统数据
- 进程调度 时间片轮转与优先级 作业调
- 数字钟仿真+源程序.zip
- 蓝牙小车程序 绝对完整 整个工程
- 倒立摆源码,自动起摆源码
评论
共有 条评论