master
1439768027@qq.com 6 years ago
commit 1c84adf3e4

34
z1.c

@ -0,0 +1,34 @@
void select_name()
{char name[10];
int m;
printf("请输入姓名:");
scanf("%s",name);
for(m=0;m<i;m++)
{
if(!strcmp(name,student[m].name))
{
printf("学号为%ld\t",student[m].xuehao);
printf("班级为%s\t",student[m].banji);
printf("姓名为%s\t",student[m].name);
printf("上机开始时间:%d:%d\t",student[m].begin.hour,student[m].begin.minute);
printf("上机结束时间:%d:%d\t",student[m].end.hour,student[m].end.minute);
printf("上机时间为:%d:%d\n",student[m].time_hour,student[m].time_minute);
}
else if(m==i)
{
printf("没有记录:\n");
}
}save();
system("pause");
system("cls");
}
void show()
{
int m;
printf("学号 班级 姓名 上机时间 下机时间 用时\n");
for(m=0;m<i;m++)
{printf("%ld %s %s %d:%d %d:%d %d:%d\n",student[m].xuehao,student[m].banji,student[m].name,student[m].begin.hour,student[m].begin.minute,student[m].end.hour,student[m].end.minute,student[m].time_hour,student[m].time_minute);
}
system("pause");
system("cls");
}
Loading…
Cancel
Save