ImageVerifierCode 换一换
格式:DOCX , 页数:20 ,大小:17.63KB ,
资源ID:3375531      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3375531.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(请假管理系统源代码.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

请假管理系统源代码.docx

1、请假管理系统源代码#include #include #include #include #define select inttypedef struct /账户信息 char name20; /User.name char pw20; /User.pw User;typedef struct char Num20; char n120; char Class20; char time100; char reason100; char instructor100; Leave;typedef struct char n120; char Num20;/ char name20; char Cl

2、ass20; char time100; char reason100; char instructor100;char suggest100; TEACHER;int check (char name20) int i=0; User ru; FILE *f =fopen(data.dat,rb); rewind(f); for(i=0; !feof(f); i+) int d=i*sizeof(User); fseek(f,d,SEEK_SET); fread(&ru,sizeof(User),1,f); if(strcmp(name,ru.name)=0) return 1; retur

3、n -1;int login(char name20,char pw20) User us; FILE *f =fopen(data.dat,rb); while(!feof(f) fread(&us,sizeof(User),1,f); if(strcmp(name,us.name)=0) if(strcmp(pw,us.pw)=0)return 1; return -1;int main() char n20; char plog20; char nlog20; int c; User u; FILE *f =fopen(data.dat,ab); if(f!=NULL) fwrite(&

4、u,sizeof(User),1,f); fclose(f);Login: system(color F0); system(cls); printf(nn); printf(=n); printf(| |n); printf(|-学生请假系统-|n); printf(| |n); printf(=n); printf(n); Sleep(1000); printf(n); printf(请输入帐号:); scanf(%s,nlog); c=check(nlog); if(c=1)/如果账户存在 strcpy(n,nlog);/复制登录帐号 if(strlen(n)=9)/如果是学生 int

5、a,i; select s=0; printf(n); printf(请输入密码:);/直接输入密码 scanf(%s,plog); for(a=2,i=0; i0) printf(请重新输入密码(你还有%d次机会):,a); printf(nn); scanf(%s,plog); if(login(nlog,plog)=1) goto success2; else return 0; if(login(nlog,plog)=1) success2: system(color F0); printf(nn); printf( 登陆成功/n); Sleep(1000); system(cls);

6、 LEAVESYSTEM: printf(nn); printf(=n); printf(|1.提交请假申请 |n); printf(|2.查询请假批准状态 |n); printf(| 如无需操作,可直接关闭程序 |n); printf(=n); printf(nn); Sleep(1000); printf(请输入您要执行的选项:); scanf(%d,&s); Sleep(1000); while(s!=1&s!=2) if(s!=1&s!=2) system(color 0c); printf(选项不存在,请重新输入(1/2):); s=0; scanf(%d,&s); if(s=1)/

7、写入请假 system(color F0); system(cls); printf(nn); printf(=n); printf(| |n); printf(|-提交请假申请-|n); printf(| |n); printf(=n); printf(nn); Leave a; Sleep(1000); printf(请输入班级:n); scanf(%s,a.Class); printf(请输入姓名:n); scanf(%s,a.n1); printf(请详细输入请假时间:n); scanf(%s,a.time); printf(请详细输入请假原因:n); scanf(%s,a.reaso

8、n); strcpy(nlog,a.Num); strcpy(a.instructor,0); FILE *t=fopen(leave.dat,ab); fwrite(&a,sizeof(Leave),1,t);/讲以变量u的地址开始的内存区域的一个数据写到f指向的文件中,每个数据占sizeof(User) fclose(t); fflush(t);/ Sleep(1000); printf(n); printf( 保存成功/n); printf( 请不定时来查询你的假条申请状态!nnn); system(pause); system(cls); goto LEAVESYSTEM; if(s=

9、2)/学生查询状态代码 system(color F0); system(cls); printf(nn); printf(=n); printf(| |n); printf(|-查询请假批准状态-|n); printf(| |n); printf(=n); Sleep(1000); TEACHER b; FILE *t=fopen(read.dat,rb); while(1) if(!(fread(&b,sizeof(TEACHER),1,t) break; if(strcmp(nlog,b.Num)=0) printf(-n); printf(|学生%s请假申请反馈信息: n,b.n1);

10、 printf(|班级:%sn n,b.Class); printf(|姓名:%sn n,b.n1); printf(|请假时间:%sn n,b.time); printf(|请假原因:%sn n,b.reason); printf(-n); Sleep(1000); printf(n); printf( -n); printf( 申请状态:%sn,b.instructor); printf( 辅导员意见:%sn,b.suggest); printf( -n); system(pause); Sleep(1000); system(cls); goto LEAVESYSTEM; if(s=3)

11、 goto Login; /身份学生 if(strlen(n)=4)/如果是辅导员 int a,i; select s; printf(n); printf(请输入密码:);/直接输入密码 scanf(%s,plog); for(a=2,i=0; i0) printf(请重新输入密码(你还有%d次机会):,a); printf(nn); scanf(%s,plog); if(login(nlog,plog)=1) goto success3; else return 0; if(login(nlog,plog)=1) success3: system(color F0); printf(nn)

12、; printf( 登陆成功/n); Sleep(1000); /Approvalsystem: system(cls); printf(nn); printf(=n); printf(| |n); printf(|-学生请假系统(辅导员端)-|n); printf(| |n); printf(=n); printf(n); Sleep(1000); printf(=n); printf(|1.查看学生请假申请 |n); printf(|2.返回登陆界面 |n); printf(| 如无需操作,可直接关闭程序 |n); printf(=n); printf(nn); Sleep(1000);

13、printf(请输入您要执行的选项:); scanf(%d,&s); while(s!=1&s!=2) if(s!=1&s!=2) printf(选项不存在,请重新输入(1/2):); scanf(%d,&s); if(s=1)/辅导员读 system(cls); printf(nn); printf(=n); printf(| |n); printf(|-查看学生请假申请-|n); printf(| |n); printf(=n); printf(nn); Sleep(1000); Leave a; FILE *t=fopen(leave.dat,rb); while(1) int ch;

14、if(!(fread(&a,sizeof(Leave),1,t) break; printf(-n); printf(|学生信息如下:n); printf(|班级:%sn,a.Class); printf(|姓名:%sn,a.n1); printf(|学号:%sn,a.Num); printf(|请假时间:%sn,a.time); printf(|请假原因:%sn,a.reason); printf(-n); Sleep(1000); printf(nnn); printf( n); printf( 是否批准学生请假申请 n); printf( - n); printf( - n); prin

15、tf( 1.批准学生请假申请 n); printf( 2.不批准学生请假申请 n); printf(nnn); printf(请输入您要执行的选项:); scanf(%d,&ch); while(ch!=1&ch!=2) if(ch!=1&ch!=2) printf(选项不存在,请重新输入(1/2):); scanf(%d,&ch); if(ch=1) printf(nn); printf(-n); printf(执行中.n); printf(-n); Sleep(1000); TEACHER b; FILE *F=fopen(read.dat,ab); strcpy(b.instructor

16、,您的请假申请已被批准!); printf(n); printf(辅导员意见:); scanf(%s,b.suggest); strcpy(b.Class,a.Class); strcpy(b.n1,a.n1); strcpy(b.time,a.time); strcpy(b.reason,a.reason); strcpy(b.Num,a.Num);/ FILE *f3=fopen(leave.dat,ab); fwrite(&b,sizeof(TEACHER),1,F); fclose(F); fflush(F); Sleep(1000); printf(nnn); printf( 操作成

17、功/n); system(pause); printf(nnnnn); continue; if(ch=2) printf(-n); printf(执行中.n); printf(-n); Sleep(1000); TEACHER b; FILE *F=fopen(read.dat,ab); strcpy(b.instructor,您的请假申请没有被批准,请按时上课!); printf(n); printf(辅导员意见:); scanf(%s,b.suggest); strcpy(b.Class,a.Class); strcpy(b.n1,a.n1); strcpy(b.time,a.time)

18、; strcpy(b.reason,a.reason); strcpy(b.Num,a.Num); fwrite(&b,sizeof(TEACHER),1,F); fclose(F); fflush(F); Sleep(1000); printf(nnn); printf( 操作成功/n); system(pause); printf(nnnnn); continue; if(s=2) system(cls); goto Login; /修改学生请假申请状态 反回 /如果是辅导员 if(strlen(n)=5)/如果是老师 int a,i; printf(n); printf(请输入密码:);/直接输入密码 scanf(%

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1