A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply.
Sample output:
Movie Seats Reservation
Summary of Seats:
Seat 1: Available
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6
The Seat no. is out of range!
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1
The Seat no. is already reserved!
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0
GoodBye... Thank You!!!
No Answer is Posted For this Question
Be the First to Post Answer
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
How to palindrom string in c language?
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
Is the following code legal? typedef struct a { int x; aType *b; }aType
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(ā%dā ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(ā%d ā ,*p); p++; } }
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
What is the hidden bug with the following statement? assert(val++ != 0);
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
Print an integer using only putchar. Try doing it without using extra storage.
Give a one-line C expression to test whether a number is a power of 2.