优化用户交互,优化输出

dev
ithg 7 years ago
parent 0a2db2fde3
commit a8dbc9bf01

@ -259,11 +259,13 @@ void Buy()
if (i == 1)
{
Load();
printf("请先筛选你想要的班次,正在跳转\n");
system("pause");
Query();
printf("请输入要订票的班次(若无请输入0):\n");
scanf("%s", num);
for (i = 0; i < class_num; i++)
if (strcmp(num, records[i].number) == 0) //判断字符串是否相等
if (strcmp(num, records[i].number) == 0)
if (records[i].max > records[i].bought && Judge(i) == 1)
//判断时间是否超出当前系统时间并且已售车票没超出最大客量
{
@ -432,7 +434,7 @@ void ShowTableHead()
system("cls");
printf("**************************当前所有车次表*********************************\n");
printf("\n|----------|----------|----------|----------|--------|--------|--------|\n");
printf("\n| 车次 | 发时间 | 起点站 | 终点站 |行车时间|额定载量| 已售票 |\n");
printf("\n| 车次 | 发时间 | 起点站 | 终点站 |行车时间|额定载量| 已售票 |\n");
}
void ShowTableFoot()
{

Loading…
Cancel
Save