From 61f3c0d0cc69ade599ba0302e78337e6514b12a9 Mon Sep 17 00:00:00 2001 From: "1439768027@qq.com" <1439768027@qq.com> Date: Wed, 9 Jan 2019 20:23:09 +0800 Subject: [PATCH] 3 commit --- j1.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/j1.cpp b/j1.cpp index 3bde072..c94b01b 100644 --- a/j1.cpp +++ b/j1.cpp @@ -39,3 +39,28 @@ void end_money() { printf("\n"); system("pause"); system("cls"); } +void select_xuehao() { + long int xuehao; + int m; + printf("请输入学号:"); + scanf("%ld",&xuehao); + for(m = 0; m < i; m++) + { + if(student[m].xuehao==xuehao) + { + 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\t",student[m].time_hour,student[m].time_minute); + } + else if( m == i) + { + printf("没有该生记录:\n"); + } + } +save(); + printf("\n"); system("pause"); + system("cls"); +}