Jump to content
Sign in to follow this  
arief_92

"cinema Ticket Booking System"

Recommended Posts

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
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Similar Content

    • By arel
      [color=#282828][font=helvetica, arial, sans-serif][size=3]Saya freelancer yang mempunyai kemahiran dalam PHP dan MySQL dan xampp ...[/size][/font][/color]
      [color=#282828][font=helvetica, arial, sans-serif][size=3]Pernah diupah oleh student-student Universiti untuk membangunkan sistem mereka...[/size][/font][/color]

      [color=#282828][font=helvetica, arial, sans-serif][size=3]Kadar upah amat berpatutan...(bole nego)[/size][/font][/color]

      [color=#282828][font=helvetica, arial, sans-serif][size=3]Sila nyatakan budget dan masa untuk disiapkan dan emailkan deskripsi projek....[/size][/font][/color]

      [color=#282828][font=helvetica, arial, sans-serif][size=3]programmming... php,html, mysql,javascript, css...[/size][/font][/color]

      [color=#282828][font=helvetica, arial, sans-serif][size=3]Contact me at [email protected] (24 jam)[/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3] [/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3] [/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=3] [/size][/font][/color]
×
×
  • Create New...