• Announcements

    • Peraturan Umum, Sila baca !

      1) Perbincangan illegal , seperti download , provide link muat turun, lanun sebagainya ditegah dan akan dipadam tanpa notis. Sila ambil perhatian , sebarang perbincangan mengenai download men-download, sharing link yang berkait kepada illegal material: - akan dipadam serta merta - tiada kompromi, user akan diberi warn jika melakukan kesalahan sama Contoh related : - " aku tengah sedut ni.. sejam lagi siap.. " - " kat mana ko dload laju gile.. aku lagi 14 hari nk siap" 2) Spamming, double pos, smiley semata-mata adalah satu kesalahan besar, elakkan membuat susulan pos dibawah susulan sendiri. Warning tanpa notis akan diberikan. 3) Elakkan drama fanboyism , samada berkait dengan konsol, permainan pc dan sebagainya 4) Perbincangan private server tidak dibenarkan, namun multiplayer via hamachi group dibenarkan. 5) Cheat codes dibenarkan, tetapi tidak kepada [email protected] 6) Screenshot seeloknya bersaiz 640 x 480 ke bawah, sila gunakan code spoiler sekiranya tidak resize pic anda. 7) One line posting (susulan satu baris) tanpa menjawab persoalan dan tidak memberi apa-apa manfaat dikira sebagai SPAM. SILA GUNAKAN FUNGSI REPORT JIKA TERDAPAT USER/TOPIK YANG MELANGGAR PERATURAN DI ATAS. ____________________________________________________________ _______________________________ .::. Kegagalan mematuhi terma dan syarat boleh mengakibatkan posting anda di padam dan anda mendapat warn level secara percuma .::. ____________________________________________________________ _______________________________
Sign in to follow this  
Followers 0

"cinema Ticket Booking System"


3 posts in this topic

Posted · Report post

Assalamualaikum.. dan selamat sejahtera..
Saya ada satu masalah..saya nak wat programming ttg Cinema Ticket Booking System..
Masalahnya saya xtau nak mempamerkan seat2 yang ade kat wayang tu..
Klu ade sape2 yang tahu.. Tolong ajarkan saya..

Ini sebahagian code yang baru dirangka:
[CODE]
#include <stdio.h>
int booking(int a);
int year(int B);
int categories(int c);
int movies(int d);
int time(int e);
int special(int f);
void main()
{
printf("********GREETINGS ! WELCOME TO A'S CINEMA ! ********\n\a");
int book;
printf(" Would you like to book by walk through or online booking ?\n\a");
printf(" 1 for walk through.\n 2 for online booking.\n\a");
scanf("%d", &book);
{
int booking(int a);
if(book==1)
{
printf(" How old are you ?\n\a");
}
else if(book==2)
{
printf(" How old are you ?\n\a");
}
else
printf("Not both ? Thanks. Please come again. \n\a");
}
int age;
scanf("%d", &age);
int year(int B);
if(age>=18)
{
printf(" Which category are you from ? \n\a");
printf(" 1 for student.\n 2 for children.\n 3 for adult.\n 4 for family. \n\a");
}
else if(age<18)
{
printf(" Which category are you from ? \n\a");
printf(" 1 for student.\n 2 for children.\n 3 for adult.\n 4 for family. \n\a");
}
int category;
scanf("%d", &category);
int categories(int c);
if(category==1)
{
printf(" What is your IC and student ID number ? \n\a");
int IC[13];
int ID[11];
printf(" IC number : ");
scanf("%s", &IC);
printf(" Your IC number is : %s\n\a", IC);
printf(" ID number : ");
scanf("%s", &ID);
printf(" Your ID number is : %s\n\a", ID);
printf(" Your price discount is -RM 4 \n\n\a");
printf(" What movie do you like to watch ? \n\a");
printf(" 1 for 'Fast Five'.\n 2 for 'Ombak Rindu'.\n 3 for 'Cars 2'.\n 4 for 'Adnan Sempit 2'.\n\a");
}
else if(category==2)
{
printf(" Your price discount is -RM 3 \n\n\a");
printf(" What movie do you like to watch ? \n\a");
printf(" 1 for 'Fast Five'.\n 2 for 'Ombak Rindu'.\n 3 for 'Cars 2'.\n 4 for 'Adnan Sempit 2'.\n\a");
}
else if(category==3)
{
printf(" Your price discount is -RM 2 \n\n\a");
printf(" What movie do you like to watch ? \n\a");
printf(" 1 for 'Fast Five'.\n 2 for 'Ombak Rindu'.\n 3 for 'Cars 2'.\n 4 for 'Adnan Sempit 2'.\n\a");
}
else if(category==4)
{
printf(" Your price discount is -RM 1 per person \n\n\a");
printf(" What movie do you like to watch ? \n\a");
printf(" 1 for 'Fast Five'.\n 2 for 'Ombak Rindu'.\n 3 for 'Cars 2'.\n 4 for 'Adnan Sempit 2'.\n\a");
}
int movie;
scanf("%d", &movie);
int movies(int d);
if(movie==1)
{
printf(" At what time ? \n\a");
printf(" 1 for morning at 10.00am.\n 2 for afternoon at 12.20pm.\n 3 for night at 10.00pm.\n\a");
}
else if(movie==2)
{
printf(" At what time ? \n\a");
printf(" 1 for morning at 10.00am.\n 2 for afternoon at 12.20pm.\n 3 for night at 10.00pm.\n\a");
}
else if(movie==3)
{
printf(" At what time ? \n\a");
printf(" 1 for morning at 10.00am.\n 2 for afternoon at 12.20pm.\n 3 for night at 10.00pm.\n\a");
}
else if(movie==4)
{
printf(" At what time ? \n\a");
printf(" 1 for morning at 10.00am.\n 2 for afternoon at 12.20pm.\n 3 for night at 10.00pm.\n\a");
}
int hour;
scanf("%d", &hour);
int time(int e);
if(hour==1)
{
printf(" What special movie category would you like ? \n\a");
printf(" 1 for 'Blockbuster'.\n 2 for 'Super Wednesday'.\n 3 for 'Saturday Sunday'.\n 4 for 'Midnight'.\n\a");
}
else if(hour==2)
{
printf(" What special movie category would you like ? \n\a");
printf(" 1 for 'Blockbuster'.\n 2 for 'Super Wednesday'.\n 3 for 'Saturday Sunday'.\n 4 for 'Midnight'.\n\a");
}
else if(hour==3)
{
printf(" What special movie category would you like ? \n\a");
printf(" 1 for 'Blockbuster'.\n 2 for 'Super Wednesday'.\n 3 for 'Saturday Sunday'.\n 4 for 'Midnight'.\n\a");
}
int scategory;
scanf("%d", &scategory);
int special(int f);
if(scategory==1)
{
printf(" The price for this ticket is RM 13 per person.\n\n\a");
printf(" What class would you like ?\n\a");
printf(" 1 for 'Gold Class'.\n 2 for 'Couple seat'.\n 3 for 'Standard'.\n\a");
}
if(scategory==2)
{
printf(" The price for this ticket is RM 19 per person.\n\n\a");
printf(" What class would you like ?\n\a");
printf(" 1 for 'Gold Class'.\n 2 for 'Couple seat'.\n 3 for 'Standard'.\n\a");
}
if(scategory==3)
{
printf(" The price for this ticket is RM 12 per person.\n\n\a");
printf(" What class would you like ?\n\a");
printf(" 1 for 'Gold Class'.\n 2 for 'Couple seat'.\n 3 for 'Standard'.\n\a");
}
if(scategory==4)
{
printf(" The price for this ticket is RM 11 per person.\n\n\a");
printf(" What class would you like ?\n\a");
printf(" 1 for 'Gold Class'.\n 2 for 'Couple seat'.\n 3 for 'Standard'.\n\a");
}
}
[/CODE]

Share this post


Link to post
Share on other sites

Posted · Report post

err.. display macam mana TS? word ka gui?

Share this post


Link to post
Share on other sites

Posted · Report post

kalau boleh nk display seating yg kosong tu sama dengan 0 dan yg da sold sama dengan 1. mcmne nk clearscreen. mcmne nk ltak input trus keluar statement tnpe display input yg kite masukkan tu,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0