大家好,又见面了,我是你们的朋友全栈君。
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
u=find_num_hlink_list(save,book_flight_num);
strcpy(ticket_x1.flight_num,u->info.flight_num);
strcpy(ticket_x1.start_add,u->info.start_add);
strcpy(ticket_x1.end_add,u->info.end_add);
ticket_x1.start_time.year=u->info.start_time.year;
ticket_x1.start_time.month=u->info.start_time.month;
ticket_x1.start_time.day=u->info.start_time.day;
ticket_x1.start_time.hour=u->info.start_time.hour;
ticket_x1.start_time.minute=u->info.start_time.minute;
ticket_x1.end_time.year=u->info.end_time.year;
ticket_x1.end_time.month=u->info.end_time.month;
ticket_x1.end_time.day=u->info.end_time.day;
ticket_x1.end_time.hour=u->info.end_time.hour;
ticket_x1.end_time.minute=u->info.end_time.minute;
ticket_a1=&ticket_x1;
f_t=insert_ticket_in_front_link_list(h1,ticket_a1);
save_t=f_t;
printf(“请输入乘客姓名:”);
scanf(“%s”,&passenger_x1.name);
printf(“请输入乘客地址:”);
scanf(“%s”,&passenger_x1.passenger_add);
printf(“请输入乘客ID:”);
scanf(“%s”,&passenger_x1.passenger_id);
passenger_x1.order_form_data.year=ticket_x1.order_form_data.year;
passenger_x1.order_form_data.month=ticket_x1.order_form_data.month;
passenger_x1.order_form_data.day=ticket_x1.order_form_data.day;
passenger_x1.order_form_data.hour=ticket_x1.order_form_data.hour;
passenger_x1.order_form_data.minute=ticket_x1.order_form_data.minute;
strcpy(passenger_x1.flight_num,book_flight_num);
passenger_x1.seat_num=ticket_x1.seat_num;
passenger_a1=&passenger_x1;
p_t=insert_passenger_in_front_link_list(pp1,passenger_a1);
save_p=p_t;
u->info.f_p_num++;
printf(“乘客信息保存成功!订票成功!\n”);
}
else
{ printf(“请输入订票时间格式如2007.07.01-22:50:”);
scanf(“%d.%d.%d-%d:%
d”,&ticket_x1.order_form_data.year,&ticket_x1.order_form_data.month,&ticket_x1.order_form_data.day,&ticket_x1.order
_form_data.hour,&ticket_x1.order_form_data.minute);
printf(“请输入座位号:”);
scanf(“%d”,&ticket_x1.seat_num);
printf(“请输入票价:”);
scanf(“%d”,&ticket_x1.dollar);
u=find_num_hlink_list(save,book_flight_num);
strcpy(ticket_x1.flight_num,u->info.flight_num);
strcpy(ticket_x1.start_add,u->info.start_add);
strcpy(ticket_x1.end_add,u->info.end_add);
ticket_x1.start_time.year=u->info.start_time.year;
ticket_x1.start_time.month=u->info.start_time.month;
ticket_x1.start_time.day=u->info.start_time.day;
ticket_x1.start_time.hour=u->info.start_time.hour;
ticket_x1.start_time.minute=u->info.start_time.minute;
ticket_x1.end_time.year=u->info.end_time.year;
ticket_x1.end_time.month=u->info.end_time.month;
ticket_x1.end_time.day=u->info.end_time.day;
ticket_x1.end_time.hour=u->info.end_time.hour;
ticket_x1.end_time.minute=u->info.end_time.minute;
ticket_a1=&ticket_x1;
y1=insert_ticket_fn_after_i(h1,ticket_a1);
save_t=y1;
printf(“请输入乘客姓名:”);
scanf(“%s”,&passenger_x1.name);
printf(“请输入乘客地址:”);
scanf(“%s”,&passenger_x1.passenger_add);
printf(“请输入乘客ID:”);
scanf(“%s”,&passenger_x1.passenger_id);
passenger_x1.order_form_data.year=ticket_x1.order_form_data.year;
passenger_x1.order_form_data.month=ticket_x1.order_form_data.month;
passenger_x1.order_form_data.day=ticket_x1.order_form_data.day;
passenger_x1.order_form_data.hour=ticket_x1.order_form_data.hour;
passenger_x1.order_form_data.minute=ticket_x1.order_form_data.minute;
strcpy(passenger_x1.flight_num,book_flight_num);
passenger_x1.seat_num=ticket_x1.seat_num;
passenger_a1=&passenger_x1;
p_t=insert_passenger_in_front_link_list(pp1,passenger_a1);
save_p=p_t;
u->info.f_p_num++;
printf(“乘客信息保存成功!订票成功!\n”);
};
}
else printf(“(该趟航班已满或者无此航班信息),无法给你订票!\n”);
};/*建机票的链表*/
if(ch==7)
{
printf(“请输入退票的航班号”);
scanf(“%s”,cnacel_flight_num);
save_t=delete_num_tlink_list(save_t,cnacel_flight_num);
save_p=delete_num_plink_list(save_p,cnacel_flight_num);
s=find_num_hlink_list(save,cnacel_flight_num);
s->info.f_p_num–;
printf(“退票成功!”);
}; /*退票信息*/
if(ch==0)
{
printf(“谢谢使用!by to chengjun”);
t=0;
};
};
};
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/149022.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...