資源描述:
《C語言車票管理系統(tǒng)源程序.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、#include#include/*時(shí)間庫函數(shù)*/#include/*調(diào)用系統(tǒng)函數(shù)*/#include/*串操作及內(nèi)存操作函數(shù)*/#include#include#defineN80/*宏定義多條記錄*/voidmaipiao(ints,intt);/*函數(shù)定義*/floattimes(intk);inthour(intk){switch(k){case1:return07;break;case2
2、:return10;break;case3:return13;break;case4:return16;break;case5:return19;break;case6:return21;break;/*d到閩清一天的發(fā)車時(shí)間小時(shí)段*/case7:return07;break;case8:return11;break;case9:return15;break;case10:return19;break;case11:return23;break;/*d到長樂一天的發(fā)車時(shí)間小時(shí)段*/case12:retu
3、rn07;break;case13:return11;break;case14:return15;break;case15:return19;break;case16:return23;break;/*d到連江一天的發(fā)車時(shí)間小時(shí)段*/case17:return07;break;case18:return11;break;case19:return16;break;case20:return20;break;/*d到永泰一天的發(fā)車時(shí)間小時(shí)段*/case21:return07;break;case22:re
4、turn12;break;case23:return17;break;case24:return22;break;/*d到福清一天的發(fā)車時(shí)間小時(shí)段*/case25:return07;break;case26:return14;break;case27:return19;break;case28:return22;break;/*d到羅源一天的發(fā)車時(shí)間小時(shí)段*/}}/*開車時(shí)間段*/intminute(intk){switch(k){case1:return00;break;case2:return00;
5、break;case3:return00;break;case4:return00;break;case5:return00;break;case6:return00;break;/*d到閩清一天的發(fā)車時(shí)間分鐘段*/case7:return00;break;case8:return00;break;case9:return00;break;case10:return00;break;case11:return00;break;/*d到長樂一天的發(fā)車時(shí)間分鐘段*/case12:return00;break
6、;case13:return00;break;case14:return00;break;case15:return00;break;case16:return00;break;/*d到連江一天的發(fā)車時(shí)間分鐘段*/case17:return00;break;case18:return30;break;case19:return00;break;case20:return30;break;/*d到永泰一天的發(fā)車時(shí)間分鐘段*/case21:return00;break;case22:return30;bre
7、ak;case23:return00;break;case24:return30;break;/*d到福清一天的發(fā)車時(shí)間分鐘段*/case25:return30;break;case26:return00;break;case27:return30;break;case28:return30;break;/*d到羅源一天的發(fā)車時(shí)間分鐘段*/}}/*開車時(shí)間段*/voidwap(intk){switch(k){case1:printf("閩清");break;case2:printf("長樂");brea
8、k;case3:printf("連江");break;case4:printf("永泰");break;case5:printf("福清");break;case6:printf("羅源");break;}}/*輸入終點(diǎn)站的函數(shù)*/intshijian(){structtm*ptr;time_tlt;lt=time(NULL);ptr=gmtime(<);printf(ctime(<));return0;}/*輸出當(dāng)前時(shí)間的函數(shù)*/