-
2021-05-20 12:41:22
#includeint SIZE;
int CLASS;
struct student
{
char name[9];
char sex[4];
int number;
int count;
int score;
}stu[300];
void main()
{
void start();
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("######################################\n");
printf("# 学生考勤系统 #\n");
printf("# 欢 迎 您 #\n");
printf("######################################\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("######################################\n");
printf("\t请输入班级人数:\n");
printf("######################################\n");
scanf("%d",&SIZE);
printf("\n");
printf("######################################\n");
printf("\t请输入课程节数:\n");
printf("######################################\n");
scanf("%d",&CLASS);
printf("\n");
printf("\n");
printf("\n");
printf("\n");
start();
}
void start()
{
char x;
void found();
void search();
void add();
void mark();
printf("######################################\n");
printf("# 请选择所需功能,输入对应数字: #\n");
printf("# 1.建立学生列表 #\n");
printf("# 2.查找学生信息 #\n");
printf("# 3.模拟考勤过程 #\n");
printf("# 4.计算考勤分数 #\n");
printf("# 5.退出 #\n");
printf("# #\n");
printf("######################################\n");
scanf("%S",&x);
switch(x)
{
case'1':found();break;
case'2':search();break;
case'3':add();break;
case'4':mark();break;
case'5':break;
default :printf("****输入有误,请重输 :\n");start();
}
}
void found()
{
int a;
printf("####################\n");
printf(" 开始建表。\n");
printf("####################\n");
FILE *fp;
for(a=0;a
更多相关内容 -
考勤系统C语言实现(完整源码+详细说明)
2020-07-13 19:19:456) 录入学生的缺课记录; 7) 修改某个学生的缺课记录; 8) 查询某个学生的缺课情况...备注:考勤系统至少应该有以下数据项: 缺课日期、第几节课、课程名称、学生姓名、学生学号、缺课类型(迟到、早退、请假及 旷课) -
C语言实现的学生考勤系统
2018-07-16 11:14:56这是一个学生考勤系统的C语言代码,包含了录入学生信息,学生缺勤,迟到的扣分功能 -
c语言考勤管理系统.rar
2021-08-09 11:04:37c语言考勤管理系统,系统的要求如下 (1) 录入学生的缺课记录; (2) 修改某个学生的缺课记录; (3) 查询某个学生的缺课情况; (4) 统计某段时间内,旷课学生姓名及旷课次数,按旷课次数由多到少排序; (5) 统计某段... -
C语言课程设计——学生考勤管理系统.doc
2021-08-21 22:08:44C语言课程设计——学生考勤管理系统 -
C语言课程设计学生考勤系统
2021-05-25 07:36:45《C语言课程设计学生考勤系统.doc》由会员分享,可免费在线阅读全文,更多与《C语言课程设计学生考勤系统》相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索。1、d;while(!=NULL){fwrite(,LEN,,f);=...《C语言课程设计学生考勤系统.doc》由会员分享,可免费在线阅读全文,更多与《C语言课程设计学生考勤系统》相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索。
1、d;while(!=NULL){fwrite(,LEN,,f);=gtnext;}fclose(f);rintf(quot\t\t\t创建成功,按任意键返回主菜单\nquot);getch();system(quotclsquot);mune_();}voidback(void)*退出函数*{rintf(quot\n\n\n\n\n\n\n\n\n\n\t\t\t\t感谢您的使用~\n\t\t\t\tquot);getch();exit();}f(quot\n\t\t请输入要修改的班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot\n\t\t请输入要修改的学生的座号:quot);scanf(quot%dquot,ama);while(!=NULL){if(gtnum==a){rintf(quot\n\t\t请重新输入高等数学缺勤节数:quot);scanf(quot%dquot,amgtmath);rintf(quot\n\t\t请重新输入大学英语缺勤节数:quot);scanf(quot%dquot,amgtEnglish);rintf(quot\n\t\t请输入大学物理缺勤节数:quot);scanf(quot%dquot,amgthysics);rintf(quot\n\t\t请重新输入马克思主义基本原理与概论缺勤节数:quot);scanf(quot%dquot,amgtMks);rintf(quot\n\t\t请重新输入C语言缺勤节数:quot);scanf。
2、;charselect='y',cla[];intnum,flag=;rintf(quot请输入上课班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot请输入要查询同学的座号:quot);scanf(quot%dquot,amnum);system(quotclsquot);while(!=NULL){if(gtnum==num){rintf(quot\n\nquot);rintf(quot****************************************\nquot);rintf(quot座号姓名性别数学英语物理马克思C语言教师口语体育\nquot);rintf(quot%d%s%s%d%d%d%d%d%d%d\nquot,gtnum,gtname,gtsex,gtmath,gtEnglish,gthysics,gtMks,gtC,gtteal,gtPE);rintf(quot****************************************\nquot);flag=;}=gtnext;}if(flag==)rintf(quot\t\t!!!没有这个学生信息,请核对后再输入!!!\n\nquot);getch();system(quotclsquot);mune_();}voidsearch_(void)*查询某班级信息*{charcla[];structStudent*head,*;rintf(quot请输入您要查询的班级名:quot);。
3、=gtPEtStudent*load(char[]);voidenter(void);*录入函数*voidsearch_(void);*查询函数_*voidsearch_(void);*查询函数_*voidmodify(void);*修改函数*voidback(void);*退出函数*voidmune_();*界面*voidmune_();*界面*mune_();mune_();rintf(quot\nquot);}voidmune_(){rintf(quot\n\n\n\n\n\nquot);rintf(quot\t************************************************************quot);rintf(quot\t\t\t********************quot);rintf(quot\t\t\t◇********欢迎使用班级考勤系统********◇quot);rintf(quot\t\t\t********************quot);rintf(quot\n\t************************************************************\n\n\nquot);rintf(quot================================================================================quot);rintf(quot\n\n\n\t\t\t\t\n\t\t\t\t\tquot);getch();system。
4、(quotclsquot);}voidmune_(){intotion,ch;*定义一个选项的数据类型*rintf(quot\n\n\nquot);*制作的一个漂亮的选择界面*rintf(quot\t***************************************************************\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、录入本次课考勤情况\t、查询学生考勤信息\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、创建学生信息\t\t、修改学生信息\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、查看班级考勤情况\t、退出考勤系统\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t***************************************************************\nquot);rintf(q******\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(qu。
5、gets(cla);system(quotclsquot);rintf(quot\n\t\t\t%s班的考勤情况\n\nquot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot****************************************\nquot);rintf(quot座号姓名性别数学英语物理马克思C语言教师口语体育\nquot);while(!=NULL){rintf(quot%d%s%s%d%d%d%d%d%d%d\nquot,gtnum,gtname,gtsex,gtmath,gtEnglish,gthysics,gtMks,gtC,gtteal,gtPE);=gtnext;}rintf(quot\n****************************************\nquot);getch();system(quotclsquot);mune_();}voidmodify(void)*修改函数*{inta,flag=;charcla[];structStudent*head,*;rint=;head=NULL;while(gtnum!=){n=n+;if(n==)head=;elsegtnext=;=;=(structStudent*)malloc(LEN);scanf(quot%s%d%squot,gtname,amgtnum,gtsex);gtmath=gtEnglish=gthysics=gtMks=gtC=gtteal=gtPE=;}gtnext=NULL;=he。
6、。
7、;charselect='y',cla[];intnum,flag=;rintf(quot请输入上课班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot请输入要查询同学的座号:quot);scanf(quot%dquot,amnum);system(quotclsquot);while(!=NULL){if(gtnum==num){rintf(quot\n\nquot);rintf(quot****************************************\nquot);rintf(quot座号姓名性别数学英语物理马克思C语言教师口语体育\nquot);rintf(quot%d%s%s%d%d%d%d%d%d%d\nquot,gtnum,gtname,gtsex,gtmath,gtEnglish,gthysics,gtMks,gtC,gtteal,gtPE);rintf(quot****************************************\nquot);flag=;}=gtnext;}if(flag==)rintf(quot\t\t!!!没有这个学生信息,请核对后再输入!!!\n\nquot);getch();system(quotclsquot);mune_();}voidsearch_(void)*查询某班级信息*{charcla[];structStudent*head,*;rintf(quot请输入您要查询的班级名:quot);。
8、d;while(!=NULL){fwrite(,LEN,,f);=gtnext;}fclose(f);rintf(quot\t\t\t创建成功,按任意键返回主菜单\nquot);getch();system(quotclsquot);mune_();}voidback(void)*退出函数*{rintf(quot\n\n\n\n\n\n\n\n\n\n\t\t\t\t感谢您的使用~\n\t\t\t\tquot);getch();exit();}f(quot\n\t\t请输入要修改的班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot\n\t\t请输入要修改的学生的座号:quot);scanf(quot%dquot,ama);while(!=NULL){if(gtnum==a){rintf(quot\n\t\t请重新输入高等数学缺勤节数:quot);scanf(quot%dquot,amgtmath);rintf(quot\n\t\t请重新输入大学英语缺勤节数:quot);scanf(quot%dquot,amgtEnglish);rintf(quot\n\t\t请输入大学物理缺勤节数:quot);scanf(quot%dquot,amgthysics);rintf(quot\n\t\t请重新输入马克思主义基本原理与概论缺勤节数:quot);scanf(quot%dquot,amgtMks);rintf(quot\n\t\t请重新输入C语言缺勤节数:quot);scanf。
9、=gtPEtStudent*load(char[]);voidenter(void);*录入函数*voidsearch_(void);*查询函数_*voidsearch_(void);*查询函数_*voidmodify(void);*修改函数*voidback(void);*退出函数*voidmune_();*界面*voidmune_();*界面*mune_();mune_();rintf(quot\nquot);}voidmune_(){rintf(quot\n\n\n\n\n\nquot);rintf(quot\t************************************************************quot);rintf(quot\t\t\t********************quot);rintf(quot\t\t\t◇********欢迎使用班级考勤系统********◇quot);rintf(quot\t\t\t********************quot);rintf(quot\n\t************************************************************\n\n\nquot);rintf(quot================================================================================quot);rintf(quot\n\n\n\t\t\t\t\n\t\t\t\t\tquot);getch();system。
-
c语言大学生考勤系统
2020-10-29 19:02:08大学生考勤系统是一个由简单实用的学生考勤系统程序实现的系统,主要功能包括建立考勤初始记录文件、考勤数据的新增及进行当日考勤、查找、修改、删除、排序、统计、显示输出等。所有考勤统计数据利用文件系统保存,... -
C语言课程设计学生考勤系统任务书.doc
2021-06-14 15:29:49C语言课程设计学生考勤系统任务书 -
C语言学生考勤系统的设计
2012-06-14 13:45:43算法和程序设计练习 -
c语言课设-考勤管理系统
2021-07-05 08:23:46这些天因为补修c语言课设,在花费了一段时间后写完了这个课设,课设的要求如下: 考勤信息记录了学生的缺课情况,它包括:缺课日期、第几节课、课程名称、学生姓名、缺课类型(迟到、早退、请假及旷课)。试设计一...这些天因为补修c语言课设,在花费了一段时间后写完了这个课设,课设的要求如下:
考勤信息记录了学生的缺课情况,它包括:缺课日期、第几节课、课程名称、学生姓名、缺课类型(迟到、早退、请假及旷课)。试设计一考勤管理系统,使之能提供以下功能:
(1) 录入学生的缺课记录;
(2) 修改某个学生的缺课记录;
(3) 查询某个学生的缺课情况;
(4) 统计某段时间内,旷课学生姓名及旷课次数,按旷课次数由多到少排序;
(5) 统计某段时间内,有学生旷课的课程及旷课人次,按旷课人次由多到少排序;
(6) 系统以菜单方式工作。
本程序由visual studio 2017编写
我会先将程序放上来然后后面慢慢加注释,程序的大概思路是设计三个结构体,考勤信息结构体负责保存每一条缺课信息,其中包括学生信息和课程信息,每次添加考勤信息的时候,剩下的两个学生和课程结构体会自动从里面添加所需要的信息,整个程序的功能实现也是建立在三个结构体的基础上的。#define _CRT_SECURE_NO_WARNINGS #define N 1000 #define M 100 #include<stdio.h> #include<stdlib.h> #include<string.h> struct kaoqing { //int total;//旷课总节数 int number;// 旷课的第几节 char coure_name[20];//课程名称 char stu_name[20];//学生名字 char type[20];//课程类型 int year; int month; int day; }; struct stu { char stu_name2[20]; int num;//每个学生的旷课总节数,旷课次数 }; struct course { char coure_name2[20];//课程名称 int num;//本门课程旷课人次 }; struct kaoqing K[N+1]= { 0 }; struct stu S[M + 1] = { 0 }; struct course C[M + 1] = { 0 }; int add_course(char name[], int *t) { int z = *t; int i = 1; int flag = 0; for (; i < z; i++) { if (strcmp(C[i].coure_name2, name) == 0) { flag = 1; } } if (flag) { return 1;// } strcpy(C[i].coure_name2, name); ++(*t); return 0; } int add_stu(char name[],int *t) { int m = *t; int i = 1; int flag = 0; for(;i<m;i++) { if (strcmp(S[i].stu_name2, name) == 0) { flag = 1; } } if (flag) { return 1;// } strcpy(S[i].stu_name2, name); ++(*t); return 0; } void Coure_show(int n,int m) { int imax; int temp; int i = 1, j = 1; int by, bm, bd, ey, em, ed; for (; i < n; i++) { printf("%s缺课日期:%d年%d月%d日 第%d节课 %s %s\n", K[i].stu_name, K[i].year, K[i].month, K[i].day, K[i].number, K[i].coure_name, K[i].type); } printf("请输入统计时间段的起点时间:"); scanf("%d%d%d", &by, &bm, &bd); printf("请输入统计时间段的终点时间:"); scanf("%d%d%d", &ey, &em, &ed); i = 1; j = 1; for (; i < m; i++) { for (j = 1; j < n; j++) { if ((K[j].year >= by) && (K[j].year <= ey)) { if ((K[j].month >= bm) && (K[j].month <= em)) { if ((K[j].day >= bd) && (K[j].day <= ed)) { if (strcmp(K[j].coure_name, C[i].coure_name2) == 0) { ++C[i].num; } } } } } } i = 1; j = 1; for (; i < m; i++) { imax = i; for (j = i + 1; j < m; j++) { if (C[j].num > C[imax].num) { imax = j; } } temp = C[imax].num; C[imax].num = C[i].num; C[i].num = temp; } i = 1; j = 1; printf("从%d年%d月%d日到%d年%d月%d日这段时间内,旷课情况如下:\n", by, bm, bd, ey, em, ed); for (; i < m; i++) { //if (C[i].num > 0) { printf("%s 旷课人次%d\n", C[i].coure_name2, C[i].num); //} for (j = 1; j < n; j++) { if (strcmp(K[j].coure_name, C[i].coure_name2) == 0) { printf("缺课日期:%d年%d月%d日 第%d节课 %s %s\n", K[j].year, K[j].month, K[j].day, K[j].number, K[j].stu_name, K[j].type); } } } i = 1; for (; i < m; i++) { C[i].num = 0; } } void Info_show(int n,int m) { int imax; int temp; int i = 1,j=1; int by, bm, bd,ey,em,ed; for (; i < n; i++) { printf("%s缺课日期:%d年%d月%d日 第%d节课 %s %s\n",K[i].stu_name,K[i].year, K[i].month, K[i].day, K[i].number, K[i].coure_name, K[i].type); } printf("请输入统计时间段的起点时间:"); scanf("%d%d%d", &by, &bm, &bd); printf("请输入统计时间段的终点时间:"); scanf("%d%d%d", &ey, &em, &ed); i = 1; j = 1; for (; i < m; i++) { for (j=1; j < n; j++) { if ((K[j].year >= by) && (K[j].year <= ey)) {//满足年份则不需要管月份和日期 if ((K[j].month >= bm) && (K[j].month <= em)) {//不满足年份满足月份则不需要管 if ((K[j].day >= bd) && (K[j].day <= ed)) { if (strcmp(K[j].stu_name,S[i].stu_name2)==0) { ++S[i].num; } } } } } } i = 1; j = 1; for (; i < m; i++) { imax = i; for (j = i + 1; j < m; j++) { if (S[j].num > S[imax].num) { imax = j; } } temp = S[imax].num; S[imax].num = S[i].num; S[i].num = temp; } i = 1; j = 1; printf("从%d年%d月%d日到%d年%d月%d日这段时间内,旷课情况如下:\n",by,bm,bd,ey,em,ed); for (; i < m; i++) { if (S[i].num > 0) { printf("%s 旷课次数%d\n", S[i].stu_name2, S[i].num); } for (j=1; j < n; j++) { if (strcmp(K[j].stu_name, S[i].stu_name2) == 0) { printf("缺课日期:%d年%d月%d日 第%d节课 %s %s\n", K[j].year, K[j].month, K[j].day, K[j].number, K[j].coure_name, K[j].type); } } } i = 1; for (; i < m; i++) { S[i].num = 0; } } void Info_change(int n) { char name[20]; int i=1; int flag = 0;//记录是否修改 int year, month, day, number; printf("请输入想修改的学生姓名:"); scanf("%s", name); printf("请输入想修改记录的时间和节数:"); scanf("%d%d%d%d", &year, &month, &day, &number); for (; i < n; i++) { if ((strcmp(K[i].stu_name,name) == 0)&&((K[i].year==year)&&(K[i].month==month)&&(K[i].day==day)&&(K[i].number==number))) { printf("请依次输入新的该条信息!"); printf("请输入缺课日期,格式为年 月 日:"); scanf("%d%d%d", &K[i].year, &K[i].month, &K[i].day); printf("请输入缺课课程为当日第几节:"); scanf("%d", &K[i].number); printf("请输入缺课课程名称:"); scanf("%s", K[i].coure_name); printf("请输入缺课类型:"); scanf("%s", K[i].type); printf("请输入缺课学生姓名:"); scanf("%s", K[i].stu_name); printf("修改成功!"); ++flag; } } if (!flag) { printf("修改失败!请联系管理员进行错误排查!"); } } void Info_find(int n) { char name[20]; int i = 1; printf("请输入查找学生姓名:"); scanf("%s", name); printf("%s的缺课情况如下:\n",name); for (; i < n; i++) { if (strcmp(K[i].stu_name, name) == 0) { printf("缺课日期:%d年%d月%d日 第%d节课 %s %s\n", K[i].year, K[i].month, K[i].day, K[i].number, K[i].coure_name, K[i].type); } } } void Info_init(int *x,int *y,int *z) { /* int number;// 旷课的第几节 char coure_name[20];//课程名称 char stu_name[20];//学生名字 char type[20];//课程类型 int year; int month; int day; */ int a_s; int a_c; int X = *x; int Y = *y; int Z = *z; int numbera;// 旷课的第几节 char coure_namea[20];//课程名称 char stu_namea[20];//学生名字 char typea[20];//课程类型 int yeara; int montha; int daya; FILE *fp; if ((fp = fopen("INFO.txt", "r")) == NULL) { printf("数据读入失败!请联系管理员进行错误排查!"); exit(0); //退出程序(结束程序) } while (fscanf(fp, "%d%s%s%s%d%d%d", &numbera, coure_namea, stu_namea, typea, &yeara, &montha, &daya) == 7) { K[*x].number = numbera; strcpy(K[*x].coure_name,coure_namea); strcpy(K[*x].stu_name, stu_namea); strcpy(K[*x].type, typea); K[*x].year = yeara; K[*x].month = montha; K[*x].day = daya; ++(*x); printf("%d\n", *x); a_s = add_stu(stu_namea,y); a_c = add_course(coure_namea,z); /*if (!a_s) { printf("%d\n", *y); printf("学生姓名数组初始化成功!\n"); } if (!a_c) { printf("%d\n", *z); printf("课程名称数组初始化成功!\n"); }*/ } fclose(fp); } void Info_save(int n) { int i=1; FILE * fp; if ((fp = fopen("INFO.txt", "w")) == NULL) { printf("数据读入失败!请联系管理员进行错误排查!"); exit(0); //退出程序(结束程序) } for (; i < n; i++) { fprintf(fp, "%d %s %s %s %d %d %d\n", K[i].number, K[i].coure_name, K[i].stu_name, K[i].type, K[i].year, K[i].month, K[i].day); } fclose(fp); } void Info_in(int *w,int *z,int *v) { char name[20]; char c_name[20]; int flag1, flag2; int n = *w;//记录数组的控制数 int m = *z;//学生数组的控制数 int o = *z;//课程数组的控制数 printf("请依次输入学生的缺课情况:"); printf("请输入缺课日期,格式为年 月 日:"); scanf("%d%d%d", &K[n].year, &K[n].month, &K[n].day); printf("请输入缺的课程为当日第几节:"); scanf("%d", &K[n].number); printf("请输入缺的课程的名称:"); scanf("%s", K[n].coure_name); strcpy(c_name, K[n].coure_name); flag1 = add_course(c_name, v); if (!flag1) { printf("课程名称添加成功"); } printf("请输入缺课的学生姓名:"); scanf("%s", K[n].stu_name); strcpy(name, K[n].stu_name); flag2=add_stu(name,z); if (!flag2) { printf("学生姓名添加成功"); } printf("请输入缺课类型:"); scanf("%s", K[n].type); printf("添加成功!"); ++(*w); } int main() { int X = 1; int Y = 1; int Z = 1; Info_init(&X,&Y,&Z); while (1) { system("cls"); int n; printf(" *************************************************************************\n"); printf(" ** **\n"); printf(" ** -------欢迎使用考勤管理系统------ **\n"); printf(" ** **\n"); printf(" *************************************************************************\n\n"); printf("\t\t\t [ 1.缺课信息登记 ]\n\n"); printf("\t\t\t [ 2.缺课信息修改 ]\n\n"); printf("\t\t\t [ 3.缺课信息查询 ]\n\n"); printf("\t\t\t [ 4.旷课学生信息展示]\n\n"); printf("\t\t\t [ 5.课程情况展示 ]\n\n"); printf("\t\t\t [ 6.退出系统 ]\n\n"); printf("请输入需要使用的功能数字:"); scanf("%d", &n); while (n < 1 || n > 7) { printf("\n\n代码输入有误,请您重新输入:"); scanf("%d", &n); } switch (n) { case 1:Info_in(&X,&Y,&Z); break; case 2:Info_change(X); break; case 3:Info_find(X); break; case 4:Info_show(X,Y); break; case 5:Coure_show(X,Z); break; case 6:exit(0); } Info_save(X); system("pause"); } return 0; }
-
C语言课程设计学生考勤系统最终版(范文1)
2021-05-22 05:58:50《C语言课程设计学生考勤系统.doc》由会员分享,可免费在线阅读全文,更多与《C语言课程设计学生考勤系统(最终版)》相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索。1、;return(head);}voidenter()*...《C语言课程设计学生考勤系统.doc》由会员分享,可免费在线阅读全文,更多与《C语言课程设计学生考勤系统(最终版)》相关文档资源请在帮帮文库(www.woc88.com)数亿文档库存里搜索。
1、;return(head);}voidenter()*录入函数*{structStudent*head,*;charselect='y',cla[];intsub,stu,num,flag=;rintf(quot请输入上课班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);system(quotclsquot);while(select=='y'||select=='Y'){rintf(quot\n\n\nquot);rintf(quot\t*************************班的考勤信息返回菜单voidsave(structStudent*,char[]);structStudent*load(charfilename[])开始数据写入文件关闭文件退出打开文件开始打开文件读出数据返回菜单结构的应用Ifelse结构和while结构嵌套结构:while(gtnum!=){n=n+;if(n==)head=;elsegtnext=;=;=(structStudent*)malloc(LEN);scanf(quot%s%d%squot,gtname,amgtnum,gtsex);gtmath=gtEnglish=gthysics=gtMks=gtC=gtteal=gtPE=;}gtnext=NULL;=head;while(!=NULL){fw。
2、quot);search_();}eak;case:{ch=getchar();system(quotclsquot);back();}eak;default:rintf(quot\t\t\t输入错误,请重新输入!!!quot);}rintf(quot\n\t\t\t\tquot);}ch=getchar();}voidsave(structStudent*head,charfilename[]){FILE*f;structStudent*=head;if((f=foen(filename,quotwbquot))==NULL){rintf(quotcannotoenfile\nquot);exit();}while(!=NULL){fwrite(,LEN,,f);=gtnext;}fclose(f);}structStudent*load(charfilename[]){FILE*f;structStudent*head,*,*;head=NULL;=NULL;if((f=foen(filename,quotrbquot))==NULL){rintf(quotcannotoenfile\nquot);exit();}while(!feof(f)){=(structStudent*)malloc(LEN);if(fread(,LEN,,f)==){if(head==NULL)head=;if()gtnext=;=;}}gtnext=NULL。
3、;charselect='y',cla[];intnum,flag=;rintf(quot请输入上课班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot请输入要查询同学的座号:quot);scanf(quot%dquot,amnum);system(quotclsquot);while(!=NULL){if(gtnum==num){rintf(quot\n\nquot);rintf(quot****************************************\nquot);rintf(quot座号姓名性别数学英语物理马克思C语言教师口语体育\nquot);rintf(quot%d%s%s%d%d%d%d%d%d%d\nquot,gtnum,gtname,gtsex,gtmath,gtEnglish,gthysics,gtMks,gtC,gtteal,gtPE);rintf(quot****************************************\nquot);flag=;}=gtnext;}if(flag==)rintf(quot\t\t!!!没有这个学生信息,请核对后再输入!!!\n\nquot);getch();system(quotclsquot);mune_();}voidsearch_(void。
4、)*查询某班级信息*{charcla[];structStudent*head,*;rintf(quot请输入您要查询的班级名:quot);gets(cla);system(quotclsquot);rintf(quot\n\t\t\t%s班的考勤情况\n\nquot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot****************************************\nquot);rintf(quot座号姓名性别数学英语物理马克思C语言教师口语体育\nquot);while(!=NULL){rintf(quot%d%s%s%d%d%d%d%d%d%d\nquot,gtnum,gtname,gtsex,gtmath,gtEnglish,gthysics,gtMks,gtC,gtteal,gtPE);=gtnext;}rintf(quot\n****************************************\nquot);getch();system(quotclsquot);mune_();}voidmodify(void)*修改函数*{inta,flag=;charcla[];structStudent*head,*;rint=;head=NULL;while(gtnum!=){n=n+;if(n==)head=;elsegtnext=。
5、t\t*\nquot);rintf(quot\t*、体育\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t********************************\nquot);rintf(quot\nquot);rintf(quot\t\t\t请输入科目选项(~):\n\t\t\t\tquot);scanf(quot%dquot,amsub);while(){if(subgtamamsublt)eak;elserintf(quot\t\t\t输入错误,请重新输入\n\t\t\t\tquot);scanf(quot%dquot,amsub);}system(quotclsquot);rintf(quot请输入本次课缺席同学的座号:quot);scanf(quot%dquot,amstu);rintf(quot\nquot);rintf(quot请输入该同学的缺课节数:quot);scanf(quot%dquot,amnum);while(!=NULL){if(gtnum==stu)switch(sub){case:{gtmath+=num;}eak;case:{gtEnglish+=num;}eak;case:{gthysics+=num;}eak;case:{gtMks+=。
6、\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、创建学生信息\t\t、修改学生信息\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、查看班级考勤情况\t、退出考勤系统\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t***************************************************************\nquot);rintf(q******\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、高等数学\t\t、大学英语\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、大学物理\t\t、马克思基本原理概论*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、C程序设计基础\t、教师口语\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\。
7、***************quot);rintf(quot\t\t\t◇********欢迎使用班级考勤系统********◇quot);rintf(quot\t\t\t********************quot);rintf(quot\n\t************************************************************\n\n\nquot);rintf(quot================================================================================quot);rintf(quot\n\n\n\t\t\t\t\n\t\t\t\t\tquot);getch();system(quotclsquot);}voidmune_(){intotion,ch;*定义一个选项的数据类型*rintf(quot\n\n\nquot);*制作的一个漂亮的选择界面*rintf(quot\t***************************************************************\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*\t\t\t\t\t\t\t*\nquot);rintf(quot\t*、录入本次课考勤情况\t、查询学生考勤信息\t。
8、:quot);scanf(quot%dquot,amgtEnglish);rintf(quot\n\t\t请输入大学物理缺勤节数:quot);scanf(quot%dquot,amgthysics);rintf(quot\n\t\t请重新输入马克思主义基本原理与概论缺勤节数:quot);scanf(quot%dquot,amgtMks);rintf(quot\n\t\t请重新输入C语言缺勤节数:quot);scanf(quot%dquot,amgtC);rintf(quot\n\t\t请重新输入英语口语缺勤节数:quot);scanf(quot%dquot,amgtteal);rintf(quot\n\t\t请重新输入体育缺勤节数目:quot);scanf(quot%dquot,amgtPE);flag=;save(head,cla);rintf(quot\n\t\t修改成功!\n\t\tquot);eak;}=gtnext;}if(flag==){rintf(quot\t\t!!!没有这个学生信息,请核对后再输入!!!\n\nquot);}getch();system(quotclsquot);mune_();}voidcreat(void)*创建函数*{FILE*f;structStudent*head,*,*,*;charfilename[];n=;==(structStudent*)malloc(LEN);rintf(quot请输入。
9、num;}eak;case:{gtC+=num;}eak;case:{gtteal+=num;}eak;case:{gtPE+=num;}eak;}=gtnext;}rintf(quot\n\n\t\t******输入成功******!!!\nquot);rintf(quot是否继续输入(y\\n):quot);scanf(quot%cquot,amselect);}save(head,cla);getch();system(quotclsquot);mune_();}voidsearch_(void)*查询个人信息*{structStudent*head,*uot\nquot);rintf(quot\t\t\t请输入您所需的操作(~):\n\t\t\t\tquot);while(){scanf(quot%dquot,amotion);switch(otion){case:{ch=getchar();system(quotclsquot);enter();}eak;case:{ch=getchar();system(quotclsquot);search_();}eak;case:{ch=getchar();system(quotclsquot);creat();}eak;case:{ch=getchar();system(quotclsquot);modify();}eak;case:{ch=getchar();system(quotcl。
10、rite(,LEN,,f);=gtnext;}fclose(f);rintf(quot\t\t\t创建成功,按任意键返回主菜单\nquot);getch();system(quotclsquot);退出mune_();switch结构switch(sub){case:{gtmath+=num;}eak;case:{gtEnglish+=num;}eak;case:{gthysics+=num;}eak;case:{gtMks+=num;}eak;case:{gtC+=num;}eak;case:{gtteal+=num;}eak;case:{gtPE+=num;}eak;}while结构while(!=NULL){if(gtnum==a){rintf(quot\n\t\t请重新输入高等数学缺勤节数:quot);scanf(quot%dquot,amgtmath);rintf(quot\n\t\t请重新输入大学英语缺勤节数:quot);scanf(quot%dquot,amgtEnglish);rintf(quot\n\t\t请输入大学物理缺勤节数:quot);scanf(quot%dquot,amgthysics);rintf(quot\n\t\t请重新输入马克思主义基本原理与概论缺勤节数:quot);scanf(quot%dquot,amgtMks);rintf(quot\n\t\t请重新输入C语言缺勤节数:quot);scanf(quo。
11、你要创建班级的名称(如果要创建的文件已存在,将覆盖原文件):quot);gets(filename);strcat(filename,quotdatquot);if((f=foen(filename,quotwbquot))==NULL){rintf(quotcannotoenfile\nquot);exit();}rintf(quot请输入学生的基本信息:姓名、座号、性别\nquot);scanf(quot%s%d%squot,gtname,amgtnum,gtsex);gtmath=gtEnglish=gthysics=gtMks=gtC=gtteal=gtPEtStudent*load(char[]);voidenter(void);*录入函数*voidsearch_(void);*查询函数_*voidsearch_(void);*查询函数_*voidmodify(void);*修改函数*voidback(void);*退出函数*voidmune_();*界面*voidmune_();*界面*mune_();mune_();rintf(quot\nquot);}voidmune_(){rintf(quot\n\n\n\n\n\nquot);rintf(quot\t************************************************************quot);rintf(quot\t\t\t***** 。
12、;=;=(structStudent*)malloc(LEN);scanf(quot%s%d%squot,gtname,amgtnum,gtsex);gtmath=gtEnglish=gthysics=gtMks=gtC=gtteal=gtPE=;}gtnext=NULL;=head;while(!=NULL){fwrite(,LEN,,f);=gtnext;}fclose(f);rintf(quot\t\t\t创建成功,按任意键返回主菜单\nquot);getch();system(quotclsquot);mune_();}voidback(void)*退出函数*{rintf(quot\n\n\n\n\n\n\n\n\n\n\t\t\t\t感谢您的使用~\n\t\t\t\tquot);getch();exit();}f(quot\n\t\t请输入要修改的班级:quot);scanf(quot%squot,cla);strcat(cla,quotdatquot);=head=load(cla);rintf(quot\n\t\t请输入要修改的学生的座号:quot);scanf(quot%dquot,ama);while(!=NULL){if(gtnum==a){rintf(quot\n\t\t请重新输入高等数学缺勤节数:quot);scanf(quot%dquot,amgtmath);rintf(quot\n\t\t请重新输入大学英语缺勤节
-
C语言 员工考勤系统
2009-12-12 01:29:05一个用C语言写的 员工考勤管理系统~ 日考勤 考勤查询 动态设置时间等等功能 主管查询 管理员管理 要源码移步:http://download.csdn.net/source/3007859 不要在此页面留邮箱 因为可能不能及时看到 所以 请直接发... -
C语言实现大学生考勤管理系统.pdf
2021-05-21 06:53:14C语语言言实实现现大大学学生生考考勤勤管管理理系系统统程序设计题:大学生考勤系统1 问问题题描描述述该系统要求实现一个简单、实用的学生考勤系统程序,主要 能包括考勤数据的新增、删除、修改、查找、统计、排序... -
c语言学生考勤系统
2021-07-04 20:33:29学生考勤系统 功能:学生考勤系统应包含各班学生的全部信息。每个学生是一条记录,包括姓名、性别、学号、出勤情况等。本系统可模拟考勤过程,记录考勤结果,并能够在课程结束后按照设定的考勤评分标准自动给出每个... -
C语言 员工考勤系统 课程设计 源文件
2011-01-29 19:42:56员工考勤系统 课程设计 源码 VS2008 需Vs2008 不解释- - 欢迎交流 -
学生考勤系统C语言源代码.txt
2013-05-07 20:46:38基本的学生考勤系统C语言源代码,在DOS下运行,可进行简单的考勤工作。 -
考勤管理系统 数据结构 C语言
2020-07-15 15:47:04班级考勤管理系统主要的功能有:读写本地txt文件、实现角色设定,三种用户不同权限、管理员对班级成员增删改查、管理员对班级考勤管理、班委对考勤增删改查、对每周学生的出勤进行统计、班级成员根据不同条件查询... -
c语言课程设计学生考勤管理系统.doc
2020-06-05 20:30:01c语言课程设计学生考勤管理系统.doc -
C语言课程设计(班级考勤系统)
2014-03-19 11:11:055.通过对学生考勤系统的设计、编写源代码,以及对C语言中各个语法和函数的使用,使得对比较复杂的结构体、链接、文件的操作更加熟悉。 6.通过课程设计,将本学期所学知识与实际应用联系和结合起来,培养自己的动手... -
【C语言】 大学生考勤管理系统
2019-11-08 18:30:35程序设计题:大学生考勤系统 1 问题描述 该系统要求实现一个简单、实用的学生考勤系统程序,主要功能包括考勤数据的新增、删除、修改、查找、统计、排序、输出等。所有统计数据都要利用文件系统保存,以备系统下次... -
C语言编写的学生考勤信息管理系统
2020-03-18 12:27:57printf("\n\n\n\n\n\t\t ※欢迎进入学生考勤系统 \n"); color(10); printf("\n\n\n\t\t\t\t\t\t\t\tby xxxx大学xx级计科x班");color(16); Sleep(2000); } system("cls"); char i; while(1) { color(15);... -
c语言课程设计 考勤系统
2021-05-22 03:18:40匿名用户1级2013-12-03 回答/*学生考勤结构体*/typedef struct{int no; //学号char cl[8]; //班级char name[8]; //姓名char sex[3]; //性别char date[13]; //日期int flag; //出勤情况int num; //出勤次数int scr; /... -
学生考勤系统
2013-08-15 10:09:20本系统从初步调查开始,详细介绍了需求分析、流程和... 系统采用Dreamweaver编写PHP脚本,建立MySQL数据库,从界面简洁、实用的要求出发,完成了学生考勤管理系统的主要部分,对学生的考勤信息进行记录,查询与统计。 -
基于QT设计的学生考勤系统.zip
2022-01-10 23:46:43这是基于QT设计的RFID学生考勤系统,支持的功能如下: 1. 支持不同权限的人员登录系统. 教师、学生、管理员 2. 支持签到功能,整体数据存放在SQLITE数据库里 3. 支持请假模块,学生在页面上填写请假详细信息,保存到... -
C语言程序设计学生考勤系统要求及源代.doc
2021-05-20 06:49:22C语言程序设计学生考勤系统要求及源代码#include#include /*头文件。*/int SIZE; /*宏定义。*/int CLASS;struct student /*定义一个结构体数组,包含... -
C语言课程设计学生考勤系统方案.doc
2021-09-25 08:55:41C语言课程设计学生考勤系统方案.doc -
结构体——考勤系统(C语言)
2018-12-26 20:47:30考勤系统会记录下每个学生一天内每次进出实验室的时间。每位学生有一个唯一编号,每条考勤记录包括学生的编号,进入时间、离开时间。给出所有学生一天的考勤记录,请统计每个学生在实验室工作的时间,并按照工作时间... -
C语言课程设计之学生考勤管理系统
2017-10-15 10:42:30C语言大作业,大一的时候写的,现在分享给小伙伴们参考以发挥余热。 这是学生考勤管理系统,更多请搜索"C语言课程设计之". -
学生考勤系统C语言课程设计.doc
2021-09-28 15:25:58学生考勤系统C语言课程设计.doc