導航:首頁 > 電影平台 > JSP電影售票網站源碼

JSP電影售票網站源碼

發布時間:2023-09-05 08:28:31

① 電影院售票的求大蝦們幫我做一個電影院售票系統(C#,java都行)CS或者BS結構都行 ,很急 請大蝦們幫幫忙

這是我以前寫的
#include<stdio.h>
#include<string.h>
#defineN99//票數容量

structDate
{
intyear;
intmonth;
intday;
};
structWord
{
charmovie[20];//片名
structDatetime;//上映日期
intprice;//票價
intspare;//剩餘票數
}a[N],t;

voidnewticket(FILE*fp)
{
printf("片名:");
scanf("%s",t.movie);
printf("日期:(例如2014125) ");
scanf("%d%d%d",&t.time.year,&t.time.month,&t.time.day);
printf("票價:");
scanf("%d",&t.price);
printf("剩餘票數:");
scanf("%d",&t.spare);
if(t.spare!=0)//余票不為0
fprintf(fp,"%-20s%4d-%02d-%02d%3d%3d ",t.movie,t.time.year,
t.time.month,t.time.day,t.price,t.spare);
fclose(fp);
}

voidlook(FILE*fp)
{
inti,n=0;
// charch;
fclose(fp);
fp=fopen("電影票.txt","r");
for(i=0;i<N;i++)
{
fscanf(fp,"%s%d-%d-%d%d%d ",a[i].movie,&a[i].time.year,
&a[i].time.month,&a[i].time.day,&a[i].price,&a[i].spare);
if(a[i].spare>0)n++;
}
for(i=0;i<n;i++)
printf("%-20s%4d-%02d-%02d%3d%3d ",a[i].movie,a[i].time.year,
a[i].time.month,a[i].time.day,a[i].price,a[i].spare);
fclose(fp);
}

voidmenu()
{
printf("========電影票管理系統======== ");
printf("1.添加售票2.余票查詢 0.退出程序 ");
printf("============================== ");
printf("功能選項:");
}

intmain()
{
FILE*fp;
charc;
while(1)
{
menu();
scanf("%c",&c);
fp=fopen("電影票.txt","a+");
switch(c)
{
case'1':newticket(fp);break;
case'2':look(fp);break;
case'0':return0;
}
}
}

閱讀全文

與JSP電影售票網站源碼相關的資料

熱點內容
動物世界吧電影 瀏覽:570
北投狼人good電影在線 瀏覽:528
微電影風格手段 瀏覽:757
動畫英語大電影免費 瀏覽:205
張家輝經典電影原片段 瀏覽:630
薄絲電影在線觀看 瀏覽:174
2020年絲綢之路電影節在哪個電視台直播 瀏覽:680
富二代電影國語免費 瀏覽:399
金沙洲金鉑天地電影院怎麼去 瀏覽:452
2021最新VIP電影在線觀看 瀏覽:435
徐百慧主演哪些電影 瀏覽:778
邵氏電影古裝神鬼系列大全 瀏覽:127
哪些電影有經典語錄 瀏覽:292
2020年都有哪些喜劇電影 瀏覽:225
何以笙簫默微電影 瀏覽:497
8o電影天堂網O1 瀏覽:545
哪個電影結尾有文字 瀏覽:431
看小電影被別人發現了怎麼辦 瀏覽:206
如何如何百度雲看電影 瀏覽:734
app影視如何下載電影 瀏覽:681