You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

6 years ago
void end_money() {
int m,minute,hour;
char xuehao;
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>:");
scanf("%ld",&xuehao);
for(m = 0; m < i; m++)
{
if(student[m].xuehao==xuehao)
{
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%ld<6C><64><EFBFBD>»<EFBFBD>ʱ<EFBFBD><CAB1>:",xuehao);
scanf("%d:%d",&student[m].end.hour,&student[m].end.minute);
if(student[m].end.minute<student[m].begin.minute)
{
minute=student[m].end.minute+60
-student[m].begin.minute;
hour=student[m].end.hour-1-student[m].begin.hour;
student[m].time_hour = hour;
student[m].time_minute = minute;
}
else
{
minute=student[m].end.minute -student[m].begin.minute;
hour=student[m].end.hour -student[m].begin.hour;
student[m].time_hour = hour;
student[m].time_minute = minute;
}
if(minute > 0)
{
hour = hour + 1;
printf("<EFBFBD>ϻ<EFBFBD>ʱ<EFBFBD><EFBFBD>Ϊ:%d:%d <20><><EFBFBD><EFBFBD>Ϊ:%d",student[m].time_hour,student[m].time_minute,hour);
}
else {
printf("<EFBFBD>ϻ<EFBFBD>ʱ<EFBFBD><EFBFBD>Ϊ:%d:%d\n <20><><EFBFBD><EFBFBD>Ϊ:%d",student[m].time_hour,student[m].time_minute,hour);
}
}
}
save();
printf("\n"); system("pause");
system("cls");
}