91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2024-02-04
  • 語言: C/C++
  • 標簽: 訂票??C語言??

資源簡介

用C語言實現一個火車站的訂票系統,可以實現車票訂購、收入統計、流量查詢等功能。

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?

FILE?*fp;???????????????
int?xya[2]jing_e=0liu_l=0jl[5]cl[5];
char?start[10]end[10];
int?a1=68a2=90a3=85a4=60b1=700b2=1100b3=1000b4=500;
int??k1=0ch1=a1w1=a1+a2z1=a1+a2+a3bj1=a1+a2+a3+a4k2=0ch2=b1w2=b1+b2z2=b1+b2+b3bj2=b1+b2+b3+b4;

struct?qishi
{char?stat[10];
?int?price;
?int?dst;
}std[5]={{“昆明“k1k2}{“長沙“ch1ch2}{“武漢“w1w2}{“鄭州“z1z2}{“北京“bj1bj2}};

void?ji_shuan(int?aint?b)
{x=abs(std[a-1].price-std[b-1].price);?
?y=abs(std[a-1].dst-std[b-1].dst);
?jl[a-1]++;
?cl[b-1]++;
}

void?BuyTicket()
{int?i=0flg=1s;
?char?t;
?char?b[10]={“起點站“}c[10]={“終點站“}d[10]={“票價“}e[10]={“距離“}f[10]={“張數“};
?
?fp=fopen(“mzwzc.txt““w“);
?fclose(fp);
?fp=fopen(“mzwzc.txt““a“);
?fseek(fp44L0);
?fprintf(fp“%s\t%s\t%s\t%s\t%s\n“bcdef);
?fclose(fp);?
?
?while(flg)
?{printf(“\t請輸入起點站和終點站其中:\n\t1......昆明。\n\t2......長沙。\n\t3......武漢。\n\t4......鄭州。\n\t5......北京。\n“);
??printf(“\n\t起點站:“);
??scanf(“%d“&a[0]);
??if?(a[0]==1)?strcpy(start“昆明“);
??else?if(a[0]==2)?strcpy(start“長沙“);
??else?if(a[0]==3)?strcpy(start“武漢“);
??else?if(a[0]==4)?strcpy(start“鄭州“);
??else?if(a[0]==5)?strcpy(start“北京“);
??printf(“\t終點站:“);
??scanf(“%d“&a[1]);
??if?(a[1]==1)?strcpy(end“昆明“);
??else?if(a[1]==2)?strcpy(end“長沙“);
??else?if(a[1]==3)?strcpy(end“武漢“);
??else?if(a[1]==4)?strcpy(end“鄭州“);
??else?if(a[1]==5)?strcpy(end“北京“);
??if?((a[0]==a[1])||a[0]>5||a[1]>5)?printf(“輸入有誤,請重試!\n“);?
?????else?
?{printf

評論

共有 條評論