導航:首頁 > 電影平台 > 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電影售票網站源碼相關的資料

熱點內容
青田電影院在哪裡 瀏覽:488
看戰爭電影用什麼網站可以看 瀏覽:183
高幀電影哪裡看 瀏覽:147
在線觀看免費自拍小電影 瀏覽:249
什麼網站能看新電影 瀏覽:966
哪裡可以看電影院新出的電影下載 瀏覽:445
唐詩微電影賦得古原草送別 瀏覽:638
電影三十二票房 瀏覽:569
無修改電影網站 瀏覽:457
那好吧看不了小電影了 瀏覽:445
要會員的電視在哪裡可以看電影 瀏覽:891
1995年韓國電影票房年榜 瀏覽:848
不死族殺狼族是什麼電影 瀏覽:939
什麼電影有黃點多 瀏覽:376
最新優酷土豆網電影權力的游戲 瀏覽:301
如何評價眾忠愛無言這部電影 瀏覽:763
如何將照片p進電影海報 瀏覽:538
西瓜影音在線高清電影 瀏覽:718
武松電影版全集 瀏覽:26
電影在水下怎麼拍 瀏覽:759