Tuesday, 30 August 2016

Pinnacle Club implementation using Singly Linked List

Group B : Assignment No: 01 (SPPU Syllabus Assignment No :14)
Problem Statement:
Department of Computer Engineering has student's club named 'Pinnacle Club'. Students of Second, third and final year of department can be granted membership on request. Similarly one may cancel the membership of club. First node is reserved for president of club and last node is reserved for secretary of club. Write C++ program to maintain club member‘s information using singly linked list. Store student PRN and Name. Write functions to
a)Add and delete the members as well as president or even secretary.
b)Compute total number of members of club
c)Display members
d)Display list in reverse order using recursion
e) Two linked lists exists for two divisions. Concatenate two lists.



Program Code:

//============================================================================
// Name        : panclub.cpp
// Author      : Nitin Shivale (9850562515)
// Version     : 1
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
//data structure for student information i:e node
struct node
{
 int prn;
 char name[20];
 node *next;
};

class panclub
{
    int num,cnt;
    char nm[20];  //Data memebers
    node *head;
 public:
    panclub()//Constructor to initialize object
    {
     num=cnt=0;
     head=NULL;
    }
    node *create();
    void display(node *);
    node *concat(node *,node *);  //Memeber Functions with arguments
    void reverse(node *);
    node* insert_president(node *);
    void insert_sec(node *);
        void insert_member(node *);
    node* del_president(node *);
        node* del_secretary(node *);
        node* del_member(node *);
};

//To Create the list of Divisions.
node* panclub::create()
{
    node *temp,*n1;
    temp=n1=NULL;
    //int flag=1;
    //char ans='y';
    cout<<"\nHow many students data u want to insert in panclub database: ";
    cin>>cnt;
    do
    {
        n1=new node; //first of allocate the memory for all feilds of struct.
        cout<<"\nEnter the prn number of student:";
        cin>>num;
        n1->prn=num;
        //storing the prn in node feild prn;
        cout<<"\nEnter the name of student:";
        cin>>nm;
        strcpy(n1->name,nm);
        //Storing the name in node feild name.;
        n1->next=NULL; //making the next feild null.
        if(head==NULL) //check for head is empty.
        {
            head=n1;   //make new node as head
            temp=head;
        }
        else
        {
            temp=head;
            while(temp->next!=NULL) //attach at the end of list
            {
                temp=temp->next;
            }
            temp->next=n1;
        }
        cnt--;
    }while(cnt>0);

    return head;
}

void panclub::display(node *head) //display the list of both divisions.
{
 node *temp;
 temp=head;
 while(temp!=NULL)
 {
     if(temp->next==NULL)
     {
      cout<<"["<<temp->prn<<"|"<<temp->name<<"]->NULL";
     }
     else
     {
      cout<<"["<<temp->prn<<"|"<<temp->name<<"]->";
     }
     temp=temp->next;
 }
}

node* panclub::concat(node *head1,node *head2) //To concatinate both the divisions data in one list.
{
    node *head3,*temp,*temp1;
    head3=temp=temp1=NULL;
    temp=head1;
    head3=head1;
    while(temp->next!=NULL)
    {
        temp=temp->next;
    }
    temp1=head2;
    temp->next=temp1;
    return head3;
}
void panclub::reverse(node *head)
{
    node *temp;
    temp=head;
    if(temp==NULL)
        return;
    reverse(temp->next);
    cout<<"["<<temp->prn<<"|"<<temp->name<<"]->";
}

node* panclub::insert_president(node *head)
{
 node *temp,*n2;
 temp=n2=NULL;
 temp=head;
 n2=new node;
 cout<<"\nEnter the PRN number of President: ";
 cin>>n2->prn;
 cout<<"\nEnter the name of President: ";
 cin>>n2->name;
 n2->next=temp;
 head=n2;
 return head;
}

void panclub::insert_member(node *head)
{
 node *temp,*n2;
 int pn;
 temp=head;
 n2=new node;
 cout<<"\nEnter the PRN number of Member: ";
 cin>>n2->prn;
 cout<<"\nEnter the name of Member: ";
 cin>>n2->name;
 n2->next=NULL;
 cout<<"\nEnter the PRN number after which u want to add this member: ";
 cin>>pn;
 while(temp!=NULL)
 {
  if(temp->prn==pn)
  {
   n2->next=temp->next;
   temp->next=n2;
   break;
  }
  temp=temp->next;
 }
 cout<<"\n\nMember added sucessfully....!!";
}

void panclub::insert_sec(node *head)
{
 node *temp,*n2;
 temp=head;
 n2=new node;
 cout<<"\nEnter the PRN number of Secretary: ";
 cin>>n2->prn;
 cout<<"\nEnter the Name of Secretary: ";
 cin>>n2->name;
 n2->next=NULL;
 while(temp->next!=NULL)
 {
  temp=temp->next;
 }
 temp->next=n2;
}
//delete the president node from list
node* panclub::del_president(node *head)
{
 node *temp;
 temp=head;
 head=temp->next;
 free(temp);
 return head;
}
//Delete the secretary node from the list.
node* panclub::del_secretary(node *head)
{
 node *temp,*t1;
 temp=head;
 while(temp->next!=NULL)
 {
  t1=temp;
  temp=temp->next;
 }
 t1->next=NULL;
 free(temp);
 return head;
}

//Delete the memeber from the list.

node* panclub::del_member(node *head)
{
 node *temp,*t1;
 int pn;
 temp=head;
 cout<<"\nEnter the PRN number after which u want to delete member: ";
 cin>>pn;
 while(temp!=NULL)
 {
  if(temp->prn==pn)
  {
   t1=temp->next;
   temp->next=t1->next;
   free(t1);
   break;
  }
  temp=temp->next;
 }
 cout<<"\n\nMember removed sucessfully....!!";
 return head;
}
int main()
{
    panclub p1,p2,p3;
    node *h1,*h2,*h3;
    h1=h2=h3=NULL;
    int ch;
    cout << "\n\t!!!Group B:Assignment No:01!!!" << endl; // prints !!!Assignment number and group!!!
   do
   {
    cout<<"\n\n1.Enter data of SE A Division:";
    cout<<"\n2.Enter data of SE B Division:";
    cout<<"\n3.Concatination of List..";
    cout<<"\nEnter your choice: ";
    cin>>ch;
    switch(ch)
    {
     case 1:
            cout<<"\n\nPlease enter the student info who is register memeber..";
            cout<<"\n\nEnter the Panclub Data of SE A Division:\n";
            h1=p1.create();
        cout<<"\nSE Comp Division A List are as follows..\n\n";
        p1.display(h1);
        cout<<"\n\nReverse List of SE Div A:\n\n";
        p1.reverse(h1);
        p1.insert_sec(h1);
        cout<<"\nAfter insertion of Secretary: \n";
        p1.display(h1);
        h1=p1.insert_president(h1);
        cout<<"\nAfter insertion of President: \n";
        p1.display(h1);
        p1.insert_member(h1);
        cout<<"\n After insertion of member...\n";
        p1.display(h1);
        h1=p1.del_president(h1);
        cout<<"\n\nAfter deletion of president...\n";
        p1.display(h1);
        h1=p1.del_secretary(h1);
        cout<<"\n\nAfter deletion of secretary...\n";
        p1.display(h1);
        h1=p1.del_member(h1);
        cout<<"\n\nAfter deletion of member...\n";
        p1.display(h1);
        break;
    case 2:
        cout<<"\n\nEnter the Panclub Data of SE B Division:\n";
        h2=p2.create();
        cout<<"\nSE Comp Division B List are as follows..\n\n";
        p2.display(h2);
        cout<<"\n\nReverse List of SE Div B:\n\n";
        p1.reverse(h2);
        p2.insert_sec(h2);
        cout<<"\nAfter insertion of Secretary: \n";
        p2.display(h2);
        h2=p2.insert_president(h2);
        cout<<"\nAfter insertion of President: \n";
        p2.display(h2);
        p2.insert_member(h2);
        cout<<"\n After insertion of member...\n";
        p2.display(h2);
        h2=p2.del_president(h2);
        cout<<"\n\nAfter deletion of president...\n";
        p1.display(h2);
        h2=p2.del_secretary(h2);
        cout<<"\n\nAfter deletion of secretary...\n";
        p1.display(h2);
        h2=p2.del_member(h2);
        cout<<"\n\nAfter deletion of member...\n";
        p2.display(h2);
            break;
    case 3:
        h3=p3.concat(h1,h2);
        cout<<"\n\nThe concatenation of Div : A and Div : B of SE Comp Class are as follows.\n\n";
        p3.display(h3);
            break;
  }
 }while(ch!=4);
        return 0;

}


/********************** OUTPUT **********************************************
[student@localhost Documents]$ g++ panclub.cpp
[student@localhost Documents]$ ./a.out

    !!!Group B:Assignment No:01!!!


1.Enter data of SE A Division:
2.Enter data of SE B Division:
3.Concatination of List..
Enter your choice: 1


Please enter the student info who is register memeber..

Enter the Panclub Data of SE A Division:

How many students data u want to insert in panclub database: 2

Enter the prn number of student:333

Enter the name of student:nitin

Enter the prn number of student:444

Enter the name of student:sham

SE Comp Division A List are as follows..

[333|nitin]->[444|sham]->NULL

Reverse List of SE Div A:

[444|sham]->[333|nitin]->
Enter the PRN number of Secretary: 555

Enter the Name of Secretary: sachin

After insertion of Secretary:
[333|nitin]->[444|sham]->[555|sachin]->NULL
Enter the PRN number of President: 111

Enter the name of President: tejas

After insertion of President:
[111|tejas]->[333|nitin]->[444|sham]->[555|sachin]->NULL
Enter the PRN number of Member: 222

Enter the name of Member: ram

Enter the PRN number after which u want to add this member: 111


Member added sucessfully....!!
 After insertion of member...
[111|tejas]->[222|ram]->[333|nitin]->[444|sham]->[555|sachin]->NULL

After deletion of president...
[222|ram]->[333|nitin]->[444|sham]->[555|sachin]->NULL

After deletion of secretary...
[222|ram]->[333|nitin]->[444|sham]->NULL
Enter the PRN number after which u want to delete member: 222


Member removed sucessfully....!!

After deletion of member...
[222|ram]->[444|sham]->NULL

1.Enter data of SE A Division:
2.Enter data of SE B Division:
3.Concatination of List..
Enter your choice: 2


Enter the Panclub Data of SE B Division:

How many students data u want to insert in panclub database: 3

Enter the prn number of student:123

Enter the name of student:sudhir

Enter the prn number of student:124

Enter the name of student:mohit

Enter the prn number of student:125

Enter the name of student:kohali

SE Comp Division B List are as follows..

[123|sudhir]->[124|mohit]->[125|kohali]->NULL

Reverse List of SE Div B:

[125|kohali]->[124|mohit]->[123|sudhir]->
Enter the PRN number of Secretary: 126

Enter the Name of Secretary: Dough

After insertion of Secretary:
[123|sudhir]->[124|mohit]->[125|kohali]->[126|Dough]->NULL
Enter the PRN number of President: 121

Enter the name of President: Bill

After insertion of President:
[121|Bill]->[123|sudhir]->[124|mohit]->[125|kohali]->[126|Dough]->NULL
Enter the PRN number of Member: 122

Enter the name of Member: Gates

Enter the PRN number after which u want to add this member: 111


Member added sucessfully....!!
 After insertion of member...
[121|Bill]->[123|sudhir]->[124|mohit]->[125|kohali]->[126|Dough]->NULL

After deletion of president...
[123|sudhir]->[124|mohit]->[125|kohali]->[126|Dough]->NULL

After deletion of secretary...
[123|sudhir]->[124|mohit]->[125|kohali]->NULL
Enter the PRN number after which u want to delete member: 123


Member removed sucessfully....!!

After deletion of member...
[123|sudhir]->[125|kohali]->NULL

1.Enter data of SE A Division:
2.Enter data of SE B Division:
3.Concatination of List..
Enter your choice: 3


The concatenation of Div : A and Div : B of SE Comp Class are as follows.

[222|ram]->[333|nitin]->[123|sudhir]->[125|kohali]->NULL

1.Enter data of SE A Division:
2.Enter data of SE B Division:
3.Concatination of List..
Enter your choice: 4
[student@localhost Documents]$


   

**************************************************************************************/

Sparse Matrix Realization and Operations on it

Group A : Assignment No : 04 (SPPU Syllabus Assignment No: 11)
Problem Statement:
Write C++ program for sparse matrix realization and operations on it- Transpose, Fast Transpose and addition of two matrices.

Program Code:

//Author:Prof.Nitin Shivale
//Program:Sparse Matrix and it's Operations like 1.Addition, 2.Transpose(Simple/Fast).
//Group A:Assignment No:4
#include<iostream>
#include<string.h>
using namespace std;

//define structure to store non zero values of sparse matrix.
typedef struct spm
{
 int row,col;
 int nval;
};

class sparse
{
 spm sp1[10],sp2[10],sp3[20],spltr[10],fstr[10];
 int mat1[10][10],mat2[10][10]; //data members
 int r1,r2,c1,c2,i,j,k;
 public:
 sparse()             //default constructor
 {
  r1=r2=i=0;
  j=k=0;
  c1=c2=0;
 }
 void getmat();
 void showmat();       //member function
 void addspm();
 void simpl_trnspose();
 void fast_trnspose();
};

//To accept sparse matrix from user
//sparse matrix is the matrix where most of the elements are zero in it.
void sparse::getmat()
{
 //To store first matrix
 cout<<"\nHow many rows in mat1:";
 cin>>r1;
 cout<<"\nHow many cols in mat1:";
 cin>>c1;
 for(i=0;i<r1;i++)
 {
  for(j=0;j<c1;j++)
  {
   cout<<"\nEnter ["<<i<< "]["<<j<<"] value of mat1: ";
   cin>>mat1[i][j];
  }
 }
 //To store second matrix
 cout<<"\nHow many rows in mat2:";
 cin>>r2;
 cout<<"\nHow many cols in mat2:";
 cin>>c2;
 for(i=0;i<r2;i++)
 {
  for(j=0;j<c2;j++)
  {
   cout<<"\nEnter ["<<i<< "]["<<j<<"] value of mat2: ";
   cin>>mat2[i][j];
  }
 }
}

//To display values inside both the sparse matrix.
void sparse::showmat()
{
 //To display value of first sparse matrix.
 cout<<"\n Matrix 1 value are as follows\n";
 for(i=0;i<r1;i++)
 {
  for(j=0;j<c1;j++)
  {
   cout<<"\t"<<mat1[i][j];
  }
  cout<<"\n";
 }
 //To display value of second spaese matrix
 cout<<"\n Matrix 2 value are as follows\n";
 for(i=0;i<r2;i++)
 {
  for(j=0;j<c2;j++)
  {
   cout<<"\t"<<mat2[i][j];
  }
  cout<<"\n";
 }
}

//Addition of both the sparse matrix.
//Addition of non zero element only which is stored in structure object sp1 and sp2.
void sparse::addspm()
{
 int n1,n2;
 n1=n2=0;
 //conversion of sparse matrix to non zero value code as follows.
 //conversion of first sparse matrix mat1 into sp1
 sp1[0].row=r1;
 sp1[0].col=c1;
 k=1;
 cout<<"\n Sparse matrix1 non_zero value are as follows:\n";
 for(i=0;i<r1;i++)
 {
  for(j=0;j<c1;j++)
  {
   if(mat1[i][j]!=0)
   {
    sp1[k].row=i;
    sp1[k].col=j;
    sp1[k].nval=mat1[i][j];
    k=k+1;
   }
  }
 }
 sp1[0].nval=k-1;
 //display non zero values of sparse matrix mat1 which is inside sp1.
 cout<<"\nRow\tCol\tnval";
 for(i=0;i<k;i++)
 {
  cout<<"\n"<<sp1[i].row<<"\t"<<sp1[i].col<<"\t"<<sp1[i].nval;
 }
 //conversion of second sparse matrix mat2 into sp2
 cout<<"\n\nSparse matrix2 non_zero value are as follows:\n";
 sp2[0].row=r2;
 sp2[0].col=c2;
 k=1;
 for(i=0;i<r2;i++)
 {
  for(j=0;j<c2;j++)
  {
   if(mat2[i][j]!=0)
   {
    sp2[k].row=i;
    sp2[k].col=j;
    sp2[k].nval=mat2[i][j];
    k=k+1;
   }
  }
 }
 sp2[0].nval=k-1;
 //display non zero values of sparse matrix mat2 which is inside sp2.
 cout<<"\nRow\tCol\tnval";
 for(i=0;i<k;i++)
 {
  cout<<"\n"<<sp2[i].row<<"\t"<<sp2[i].col<<"\t"<<sp2[i].nval;
 }
 //Addition of non zero values sp1 and sp2 logic are as follows.
 //1.Store number of non zero term of mat1 in n1 and number of non zero term of mat2 in n2.
 n1=sp1[0].nval;
 n2=sp2[0].nval;
 i=j=k=1;
 cout<<"\n No of term in sp1:"<<n1<<"\tNo of term in sp2:"<<n2;
 //2.Store the largest row and colom term of both matrices in sp3 row and col.
 if(sp1[0].row>sp2[0].row)
 {
  sp3[0].row=sp1[0].row;
 }
 else
 {
  sp3[0].row=sp2[0].row;
 }

 if(sp1[0].col>sp2[0].col)
 {
  sp3[0].col=sp1[0].col;
 }
 else
 {
  sp3[0].col=sp2[0].col;
 }
 //3. Start addition by checking following conditions.
 while((i<=n1)&&(j<=n2))//check for both term
 {
  if(sp1[i].row==sp2[j].row)//check if rows are same in sp1 and sp2.
  {
   if(sp1[i].col==sp2[j].col)//check if cols are same in sp1 and sp2.
   {
    sp3[k].row=sp1[i].row;
    sp3[k].col=sp1[i].col;
    sp3[k].nval=sp1[i].nval+sp2[j].nval; //if yes add both non zero values and store in sp3 with row,col and values detail.
    cout<<"\nvalu of add:"<<sp3[k].nval;
    i++;
    j++; //increment all indexes.
    k++;
    cout<<"\nval of i:"<<i<<"\tval of j:"<<j<<"\tval of k:"<<k;
   
   }
   else if(sp1[i].col<sp2[j].col)//check col of sp1 is less than col of sp2
   {
    sp3[k].row=sp1[i].row;
    sp3[k].col=sp1[i].col;
    sp3[k].nval=sp1[i].nval; //if yes store all values of sp1 in sp3
    i++;
    k++; //increment i and k.
    cout<<"\nval of i:"<<i<<"\tval of K:"<<k;
   }
   else
   {
    sp3[k].row=sp2[j].row;
    sp3[k].col=sp2[j].col;   //if no store all values of sp2 in sp3
    sp3[k].nval=sp2[j].nval;
    j++;
    k++; //increment j and k.
    cout<<"\nval of j:"<<j<<"\tval of K:"<<k;
   }
  }
  else if(sp1[i].row<sp2[j].row)//check row of sp1 is less than row of sp2
  {
   sp3[k].row=sp1[i].row;
   sp3[k].col=sp1[i].col;
   sp3[k].nval=sp1[i].nval; //if yes store all values of sp1 in sp3
   i++;
   k++;
   cout<<"\nval of i:"<<i<<"\tval of K:"<<k;
  }
  else
  {
   sp3[k].row=sp2[j].row;
   sp3[k].col=sp2[j].col;     //if no store all values of sp2 in sp3
   sp3[k].nval=sp2[j].nval;
   j++;
   k++;
   cout<<"\nval of j:"<<j<<"\tval of K:"<<k;
  }
 }//end of while loop
 while(i<=n1)    //Store remaining terms of sp1 in sp3 if above while (i<=n1&&j<=n2) is not true
 {  
  sp3[k].row=sp1[i].row;
  sp3[k].col=sp1[i].col;
  sp3[k].nval=sp1[i].nval;
  i++;
  k++;
  cout<<"\nval of outer while i:"<<i<<"\tval of K:"<<k;
 }
 while(j<=n2)
 {
  sp3[k].row=sp2[j].row; //Store remaining terms of sp2 in sp3 if above while (i<=n1&&j<=n2) is not true.
  sp3[k].col=sp2[j].col;
  sp3[k].nval=sp2[j].nval;
  j++;
  k++;
  cout<<"\nval of  outer while j:"<<j<<"\tval of K:"<<k;
 }
 sp3[0].nval=k-1;
 //Display the addition result which is inside sp3.
 cout<<"\nRow\tCol\tnval";
 for(i=0;i<k;i++)
 {
  cout<<"\n"<<sp3[i].row<<"\t"<<sp3[i].col<<"\t"<<sp3[i].nval;
 }
}
//To Transpose the sparse matrix
//Method: simple Transpose O(n*n)
//To chnage the rows into column and their values.
void sparse::simpl_trnspose()
{
 //chainging the rows of sp1  to columns in spltr structure.
 spltr[0].row=sp3[0].col;
 spltr[0].col=sp3[0].row;
 spltr[0].nval=sp3[0].nval;
 k=1;
 for(i=0;i<=spltr[0].row;i++)//To check number of colms
 {
  for(j=0;j<=spltr[0].nval;j++)//To check value in total no of non zero values
  {
   if(sp3[j].col==i)// if found swap the rows into colom and colm into rows.
   {
    spltr[k].row=sp3[j].col;
    spltr[k].col=sp3[j].row;
    spltr[k].nval=sp3[j].nval;
    k++;
   }
  }
 }//Total time required to execute is O(n*n).
 cout<<"\n\n Simple Transpose of addition matrix are as follows...";
 cout<<"\nRow\tCol\tnval";
 for(i=0;i<k-1;i++)
 {
  cout<<"\n"<<spltr[i].row<<"\t"<<spltr[i].col<<"\t"<<spltr[i].nval;
 }
}

void sparse::fast_trnspose()
{
 int term[5],pos[5];
 //First 0th row interchange row and col value.
 fstr[0].row=sp3[0].col;
 fstr[0].col=sp3[0].row;
 fstr[0].nval=sp3[0].nval;
 //initialize the term as zero.
 for(i=0;i<=sp3[0].col;i++)
 {
  term[i]=0;
 }
 //Now find out how mnay times the col occures in nonzero value.
 for(i=1;i<=sp3[0].nval;i++)
 {
  //term[sp3[i].col]=term[sp3[i].col]+1;
  term[sp3[i].col]++;
 }
 //find out the actual position of each term i:e coloms in row.
 pos[0]=1;
 for(i=1;i<=sp3[0].col;i++)
 {
  pos[i]=pos[(i-1)]+term[(i-1)];
 }
 //fid the position and interchange the value.
 for(i=1;i<=sp3[0].nval;i++)
 {
  j=pos[sp3[i].col];
  fstr[j].row=sp3[i].col;
  fstr[j].col=sp3[i].row;
  fstr[j].nval=sp3[i].nval;
  pos[sp3[i].col]=j+1;
 }//Totla time required to execute is O(n)+O(n)+O(n)+O(n) i:e O(n)
 cout<<"\n\n Fast Transpose of addition matrix are as follows...";
 cout<<"\nRow\tCol\tnval";
 for(i=0;i<=fstr[0].nval;i++)
 {
  cout<<"\n"<<fstr[i].row<<"\t"<<fstr[i].col<<"\t"<<fstr[i].nval;
 }
}
 
//Main function logic.
//Program execution starts from here.
int main()
{
 int n;
 sparse s1;  //s1 object of class sparse
 s1.getmat();
 s1.showmat();  //calling of member functions.
 s1.addspm();
 s1.simpl_trnspose();
 s1.fast_trnspose();
// getch();
 cout<<"\nPress one to exit....";
 cin>>n;

 return 0;
}

/********************** OUTPUT ****************************************
[student@localhost Documents]$ g++ SPMAT.CPP
SPMAT.CPP:10:1: warning: ‘typedef’ was ignored in this declaration [enabled by default]
 };
 ^
[student@localhost Documents]$ ./a.out

How many rows in mat1:3

How many cols in mat1:3

Enter [0][0] value of mat1: 0

Enter [0][1] value of mat1: 0

Enter [0][2] value of mat1: 3

Enter [1][0] value of mat1: 4

Enter [1][1] value of mat1: 0

Enter [1][2] value of mat1: 5

Enter [2][0] value of mat1: 0

Enter [2][1] value of mat1: 0

Enter [2][2] value of mat1: 0

How many rows in mat2:3

How many cols in mat2:3

Enter [0][0] value of mat2: 0

Enter [0][1] value of mat2: 2

Enter [0][2] value of mat2: 0

Enter [1][0] value of mat2: 2

Enter [1][1] value of mat2: 0

Enter [1][2] value of mat2: 4

Enter [2][0] value of mat2: 0

Enter [2][1] value of mat2: 0

Enter [2][2] value of mat2: 2

 Matrix 1 value are as follows
    0    0    3
    4    0    5
    0    0    0

 Matrix 2 value are as follows
    0    2    0
    2    0    4
    0    0    2

 Sparse matrix1 non_zero value are as follows:

Row    Col    nval
3    3    3
0    2    3
1    0    4
1    2    5

Sparse matrix2 non_zero value are as follows:

Row    Col    nval
3    3    4
0    1    2
1    0    2
1    2    4
2    2    2
 No of term in sp1:3    No of term in sp2:4
val of j:2    val of K:2
val of i:2    val of K:3
valu of add:6
val of i:3    val of j:3    val of k:4
valu of add:9
val of i:4    val of j:4    val of k:5
val of  outer while j:5    val of K:6
Row    Col    nval
3    3    5
0    1    2
0    2    3
1    0    6
1    2    9
2    2    2

 Simple Transpose of addition matrix are as follows...
Row    Col    nval
3    3    5
0    1    6
1    0    2
2    0    3
2    1    9
2    2    2

 Fast Transpose of addition matrix are as follows...
Row    Col    nval
3    3    5
0    1    6
1    0    2
2    0    3
2    1    9
2    2    2
Press one to exit....

*******************************************************************************************/

Saddle Point Matrix Operation

Group A: Assignment No :03 (SPPU Syllabus Assignment No: 08)
Problem Statement:
An m x n matrix is said to have a saddle point if some entry a[i][j] is the smallest value in row i and the largest value in j. Write C/ C++ function that determines the location of a saddle point if one exists.

Program code:

//Group A: Assignment no : 03
//Author:NMS
//Title: Saddle point

#include<iostream>
using namespace std;

class smat
{
  int mat[10][10],i,j,row,col,min,max; //data memebers
 public:
  smat() //default constructor
  {
   i=j=row=col=0;
   min=max=0;
  }
  void getdata(); //member functions
  void showmat();
  void saddlepoint();

};//end of class smat

void smat::getdata() //To accept matrix element
{
 cout<<"\n Enter How many Rows in matrix: ";
 cin>>row;
 cout<<"\n Enter How many cols in matrix: ";
 cin>>col;
 for(i=0;i<row;i++)
 {
  for(j=0;j<col;j++)
  {
   cout<<"\nEnter matrix mat["<<i<<"]["<<j<<"] element : ";
   cin>>mat[i][j];
  }
 }
}

void smat::showmat()//To show elements inside the matrix.
{
 cout<<"\nThe Elements inside the matrix are as follows...\n\n";
 for(i=0;i<row;i++)
 {
  for(j=0;j<col;j++)
  {
   cout<<"\t"<<mat[i][j];
  }
  cout<<"\n";
 }
 cout<<"\n";
}

void smat::saddlepoint()
{
 int big[5],small[5];
 for(i=0;i<5;i++)
 {
  big[i]=small[i]=0; //intialize two arrays with value zero.
 }
 //To find out the smallest value in row i
 for(i=0;i<row;i++)
 {
  small[i]=mat[i][0];
  for(j=0;j<col;j++)
  {
     if(mat[i][j]<=small[i])
     {
      small[i]=mat[i][j];
     }
  }
 }
 // To find out the Largest value in column j
 for(j=0;j<col;j++)
 {
  big[j]=mat[0][j];
  for(i=0;i<row;i++)
  {
   if(mat[i][j]>=big[j])
   {
    big[j]=mat[i][j];
   }
  }
 }
 // To fin out the largest from small array in row
 max=small[0];
 for(i=0;i<row;i++)
 {
  if(small[i]>=max)
  {
   max=small[i];
  }
 }
 //To find out smallest from the big array in col.
 min=big[0];
 for(j=0;j<col;j++)
 {
  if(big[j]<=min)
  {
   min=big[j];
  }
 }
 // Now compaire both min & max if both same then saddle point is there else not.
 if(min==max)
 {
  cout<<"\nSaddle point "<<min<<" is present in the array\n\n";
 }
 else
 {
  cout<<"\nSaddle point is not present in given matrix...\n\n";
 }
}

int main()
{
 smat s1;
 s1.getdata();
 s1.showmat();
 s1.saddlepoint();
 return 0;
}

/*************************************************************************************
[student@localhost Documents]$ g++ saddle.cpp
[student@localhost Documents]$ ./a.out

 Enter How many Rows in matrix: 3

 Enter How many cols in matrix: 3

Enter matrix mat[0][0] element : 9

Enter matrix mat[0][1] element : 8

Enter matrix mat[0][2] element : 7

Enter matrix mat[1][0] element : 6

Enter matrix mat[1][1] element : 5

Enter matrix mat[1][2] element : 4

Enter matrix mat[2][0] element : 3

Enter matrix mat[2][1] element : 2

Enter matrix mat[2][2] element : 1

The Elements inside the matrix are as follows...

    9    8    7
    6    5    4
    3    2    1


Saddle point 7 is present in the array

[student@localhost Documents]$

***************************************************************************************/

Class Test operation using C++

Group A : Assignment No: 02 (SPPU Syllabus Assignment No: 02)
Problem Statement: 
Write C/C++ program to store marks scored for first test of subject 'Data Structures and Algorithms' for N students. Compute
I. The average score of class
ii. Highest score and lowest score of class
iii. Marks scored by most of the students
iv. list of students who were absent for the test

Program Code: (Implementation)

//============================================================================
// Name        : Test.cpp
// Author      : Nitin Shivale
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

class Test
{
    int dsa[30],i,j,n,sum,cnt[50],k,rn[30]; //data members
    float av;
public:
    Test()  //default constructor
    {
        i=j=n=0;
        av=sum=k=0;
    }
    void getdata(); //member functions
    void show();
    void avg();
    void Ab_stud();
    void HS_LS();
    void MS_score();
}; //end of class declaration

//Function name: getdata()
//return type: void
//Parameter :Nil
// To accept information of test.

void Test::getdata()
{
    cout<<"\nHow many student in SE Comp Div: A : ";
    cin>>n;
    cout<<"\n\t-----------------------------------------------------";
    cout<<"\n\tEnter the marks scored for first test of subject DSA: ";
    cout<<"\n\t-----------------------------------------------------";
    cout<<"\n\nStudent who remains Absent for the test please enter -1 for them:";
    cout<<"\n                     -------------------------------------         ";
    for(i=0;i<n;i++)
    {
     cout<<"\nEnter the marks of Roll no: "<<i+1<<" : ";
     cin>>dsa[i];
    }
}

void Test::MS_score()
{
    for(i=0;i<50;i++)
    {
        cnt[i]=0;
    }
    for(i=0;i<50;i++)
    {
        for(j=0;j<n;j++)
        {
            if(dsa[j]==i)
            {
                cnt[i]=cnt[i]+1;
            }
        }
    }
    /*cout<<"\n\nCount of marks..\n\n";
    for(i=0;i<50;i++)
    {
        cout<<"\t"<<cnt[i];
    }*/
    cout<<"\n\n Marks Scored by most of the student in test are: \n";
   
    k=0;
    j=0;
        int max=cnt[j];
    for(i=0;i<50;i++)
    {
     if(cnt[i]>=max)
     {
         max=cnt[i];
         k=i;
     }
    }
    cout<<"\n\nMAximum marks "<<k<<" scored by "<<max <<" Students...\n";
    for(i=0;i<n;i++)
    {
        if(dsa[i]==k)
        {
            rn[j]=i;
            j++;
        }
    }
    cout<<"\n\n Students Roll Number are as follows..\n\n";
    for(i=0;i<j;i++)
    {
        cout<<"\t"<<rn[i]+1;
    }
}

void Test::show()
{
    cout<<"\n\nFirst Test Marks of Subject DSA are as follows...\n";
    cout<<"\n*********************************\n";
    cout<<"|  Roll No\t"<<"|"<<" DSA Marks     |";
    cout<<"\n*********************************\n";
    for(i=0;i<n;i++)
    {
        cout<<"|\t"<<i+1<<"\t|\t"<<dsa[i]<<"\t|\n";
    }
    cout<<"---------------------------------\n";
}

void Test::avg()
{
    int p=0;
    cout<<"\nAverage Score of Class = > ";
    for(i=0;i<n;i++)
    {
        if(dsa[i]!=-1)
        {
            sum=sum+dsa[i];
            p++;
        }

    }
    av=sum/p;
    cout<<av;
}

void Test::Ab_stud()
{
    int cnt=0;
    cout<<"\n\nTotal Number of Student Absent for DSA Test\n";
    cout<<"\nRoll No\t Marks\n";
    for(i=0;i<n;i++)
    {
        if(dsa[i]==-1)
        {
            cout<<i+1<<"\tAbsent\n";
            cnt++;
        }
    }
    cout<<"\n\tTotal_Absent_Student :=: "<<cnt;
}

void Test::HS_LS()
{
    int min=0;
    int max=0,rno=0,i=0;
    cout<<"\n\nHighest Score of the Class for DSA Subject are as follows..\n";
    max=dsa[i];
    for(i=0;i<n;i++)
    {
        if(dsa[i]==-1)
        {

        }
        else if(dsa[i]>=max)
        {
            max=dsa[i];
            rno=i;
        }
    }
    cout<<"\n\tDSA Highest Score: "<<"Roll No : "<<rno+1<<" Marks : "<<max;
    cout<<"\n\nLowest Score of the Class for DSA Subject are as follows..\n";
    rno=0;
    min=dsa[j];
    for(j=0;j<n;j++)
    {
        if(dsa[j]==-1)
        {

        }
        else if(dsa[j]<=min)
        {
         min=dsa[j];
         rno=j;
        }
    }
    cout<<"\n\tDSA Lowest Score: "<<"Roll No : "<<rno+1<<" Marks : "<<min;
}

int main()
{
    Test T;
    T.getdata();
    T.show();
    T.avg();
    T.Ab_stud();
    T.HS_LS();
    T.MS_score();
    cout << "\n\n\n!!!Good Bye!!!" << endl; // prints !!!Hello World!!!
    return 0;
}
/***************************************************************************************

[student@localhost Downloads]$ g++ asgn2GRA.cpp
[student@localhost Downloads]$ ./a.out

How many student in SE Comp Div: A : 10

    -----------------------------------------------------
    Enter the marks scored for first test of subject DSA:
    -----------------------------------------------------

Student who remains Absent for the test please enter -1 for them:
                     -------------------------------------        
Enter the marks of Roll no: 1 : 20

Enter the marks of Roll no: 2 : 23

Enter the marks of Roll no: 3 : 25

Enter the marks of Roll no: 4 : -1

Enter the marks of Roll no: 5 : 36

Enter the marks of Roll no: 6 : 40

Enter the marks of Roll no: 7 : 36

Enter the marks of Roll no: 8 : 36

Enter the marks of Roll no: 9 : 36

Enter the marks of Roll no: 10 : 22


First Test Marks of Subject DSA are as follows...

*********************************
|  Roll No    | DSA Marks     |
*********************************
|    1    |    20    |
|    2    |    23    |
|    3    |    25    |
|    4    |    -1    |
|    5    |    36    |
|    6    |    40    |
|    7    |    36    |
|    8    |    36    |
|    9    |    36    |
|    10    |    22    |
---------------------------------

Average Score of Class = > 30

Total Number of Student Absent for DSA Test

Roll No     Marks
4    Absent

    Total_Absent_Student :=: 1

Highest Score of the Class for DSA Subject are as follows..

    DSA Highest Score: Roll No : 6 Marks : 40

Lowest Score of the Class for DSA Subject are as follows..

    DSA Lowest Score: Roll No : 1 Marks : 20

 Marks Scored by most of the student in test are:


MAximum marks 36 scored by 4 Students...


 Students Roll Number are as follows..

    5    7    8    9


!!!Good Bye!!!

***********************************************************************************/

Set Theory implementation using c++

Group A: Assignment no: 01(SPPU Syllabus Assignment no: 01)
Problem Statement:
In Second year Computer Engineering class of M students, set A of students play cricket and set B of students play badminton. Write C/C++ program to find and display-
i.Set of students who play either cricket or badminton or both
ii.Set of students who play both cricket and badminton
iii.Set of students who play only cricket
iv.Set of students who play only badminton
v.Number of students who play neither cricket nor badminton
(Note- While realizing the set duplicate entries are to avoided)

Program Code:

//Assignment No:01 (Group A)
//Author: Nitin Shivale
//Title: Cricket & Badminton
#include <iostream>
using namespace std;
class game
{
    int c,b,m,i,j,k,cnt;
    int setA[10],setB[10],setC[20],setD[20],setAB[20];
    public:
    game()
    {
        c=b=m=0;
        i=j=k=0;
        cnt=0;
    }
    void getdata();
    void show();
    void uni();
    void ninor();
    void common();
    void onlycrick();
    void onlybadminton();
};
void game::getdata()
{
    cout<<"\nHow many students in SE Comp :";
    cin>>m;
    cout<<"\nEnter count of student who plays cricket:";
    cin>>c;
    for(i=0;i<c;i++)
    {
        cout<<"\nEnter the roll no:";
        cin>>setA[i];
    }
    cout<<"\nEnter count of student who plays badminton:";
    cin>>b;
    for(i=0;i<b;i++)
    {
        cout<<"\nEnter the Roll No:";
        cin>>setB[i];
    }
}
void game::uni()
{
    int flag=0;
    for(i=0;i<c;i++)
    {
        setC[k]=setA[i];
        k++;
    }
    for(j=0;j<b;j++)
    {
        for(i=0;i<c;i++)
        {
            if(setB[j]==setA[i])
            {
                flag=1;
            }
        }
        if(flag==0)
        {
            setC[k]=setB[j];
            k++;
        }
        flag=0;
    }
    cout<<"\nThe Student who plays either Cricket or Badminton\n";
    for(i=0;i<k;i++)
    {
        cout<<"\t"<<setC[i];
    }
}

void game::common()
{
    for(i=0;i<c;i++)
    {
     setC[k]=setA[i];
     k++;
    }
    cout<<"\nThe student who plays both...\n";
    for(j=0;j<b;j++)
    {
     for(i=0;i<c;i++)
     {
      if(setB[j]==setA[i])
      {
        cout<<"\t"<<setA[i];
      }
     }
    }
}

void game::ninor()
{
    int z;
    int flag=0;
    for(i=0;i<c;i++)
    {
     setC[k]=setA[i];
     k++;
    }
    for(j=0;j<b;j++)
    {
     for(i=0;i<c;i++)
     {
      if(setB[j]==setA[i])
      {
        flag=1;
      }
     }
     if(flag==0)
     {
      setC[k]=setB[j];
      k++;
     }
     flag=0;
    }

    for(i=0;i<k;i++)
    {
        setD[cnt]=setC[i];
        cnt++;
    }
   cout<<"\n\nThe Student who plays neither Cricket nor Badminton...\n";
   flag=0;
   for(i=1;i<=m;i++)
   {
    for(j=0;j<cnt;j++)
    {
     if(setD[j]==i)
     {
      flag=1;
     }
    }
    if(flag==0)
    {
     setAB[z]=i;
     cout<<"\t"<<i;
     z++;
    }
    flag=0;
   }
}
void game::onlycrick()
{
    int flag=0;
    cout<<"\nThe student only plays Cricket...\n";
    for(i=0;i<c;i++)
    {
        for(j=0;j<b;j++)
        {
            if(setA[i]==setB[j])
            {
                flag=1;
            }
        }
        if(flag==0)
        {
            cout<<"\t"<<setA[i];
        }
        flag=0;
    }
}

void game::onlybadminton()
{
    int flag=0;
    cout<<"\nThe student only plays Badminton...\n";
    for(j=0;j<b;j++)
    {
        for(i=0;i<c;i++)
        {
            if(setB[j]==setA[i])
            {
                flag=1;
            }
        }
        if(flag==0)
        {
            cout<<"\t"<<setB[j];
        }
        flag=0;
    }
}
void game::show()
{
    cout<<"\nThe students who plays Cricket as follows..\n";
    for(i=0;i<c;i++)
    {
        cout<<"\t"<<setA[i];
    }
    cout<<"\nThe students who plays Badminton as follows..\n";
    for(j=0;j<b;j++)
    {
        cout<<"\t"<<setB[j];
    }
}
int main()
{
    game g;
    int ch;
   
     g.getdata();
     g.show();
     g.uni();
     g.ninor();
     g.common();
     g.onlycrick();
     g.onlybadminton();
   

    cout << "\n!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    return 0;
}

/*****************************output ********************************************


[student@localhost DSL_LAB_M16_17]$ g++ set.cpp
[student@localhost DSL_LAB_M16_17]$ ./a.out

How many students in SE Comp :15

Enter count of student who plays cricket:5

Enter the roll no:2

Enter the roll no:4

Enter the roll no:6

Enter the roll no:7

Enter the roll no:8

Enter count of student who plays badminton:4

Enter the Roll No:3

Enter the Roll No:4

Enter the Roll No:5

Enter the Roll No:6

The students who plays Cricket as follows..
    2    4    6    7    8
The students who plays Badminton as follows..
    3    4    5    6
The Student who plays either Cricket or Badminton
    2    4    6    7    8    3    5

The Student who plays neither Cricket nor Badminton...
    1    9    10    11    12    13    14    15
The student who plays both...
    4    6
The student only plays Cricket...
    2    7    8
The student only plays Badminton...
    3    5
!!!Hello World!!!
[student@localhost DSL_LAB_M16_17]$



**********************************************************************************/

Monday, 29 August 2016

Cinemax Theater implemented using doubly circular linked list

Group B : Assignment No: 02 (SPPU Syllabus Assignment no: 15)
Problem Statement:
The ticket booking system of Cinemax theater has to be implemented using C++ program. There are 10 rows and 7 seats in each row. Doubly circular linked list has to be maintained to keep track of free seats at rows. Assume some random booking to start with. Use array to store pointers (Head pointer) to each row. On demand
a) The list of available seats is to be displayed
b) The seats are to be booked
c) The booking can be cancelled. 
 
Program Code: 
 
 //Cinemax Theoter Asssignment(Group B: 02)
//Author: Mr.Nitin Shivale
#include <iostream>
#include<string.h>
#include<stdlib.h>
using namespace std;

struct node    //Structure for Node i: user information (seat)
{
    int flag;
    char movie_name[20];
    char name[20];
    long mno;
    node *next;
    node *prev;
};

struct hnode  //Header node (stores metadata of each row)
{
    node *next;  //Stores the first address node address of each row.
    int cnt;     //Sotres the number of node(book) in list.
};

class Cinemax   //class name
{
    hnode *head[11]; //array of pointer of type hnode to store ten rows address.
    node *temp,*t1,*p; //data memebers.
    int n,i,j;
   public:
    Cinemax()  //default costructor
    {
     for(i=1;i<=10;i++)
     {
      head[i]=new hnode;   
          head[i]->next= NULL;   //INITIALIZATION OF HEADE ARRAY
      head[i]->cnt=0;
     }
     temp=t1=p=NULL;
     n=i=j=0;        //initialization of all data members.
    }

    void create();
    void show();
    int book_my_show(int,int,char[]);     //Member Functions Declarations.
    int cancel_my_show(int,int,char[]);
}; //end of class definition.


//Function : To book the theoter movie show logic is here..
//No of arguments passed : 03
//1. Row number 2. Number of Tickets 3.Movie name
int Cinemax::book_my_show(int r,int n,char name[20])
{
  cout<<"\nYou request for "<<n <<" Tickets of "<<name<<" movie: \n";
  temp=head[r]->next;
  int max;
  max=head[r]->cnt; //Stores the counter of booked seat.
  if(max==7)
  {
   cout<<"\nSorry there is no seat avialable in this row..";
   return 0;
  }
  else
  {
   int seat[5],cnt=0,sn;
   for(i=0;i<n;i++) //accept the seat number from user to book
   {
    cout<<"\nEnter the seat no's: ";
    cin>>sn;
    seat[i]=sn-1;// store seat number in array.
   }
   i=0;
   while(temp->next!=head[r]->next)//Check upto the last element of list
   {
    if(cnt!=seat[i])
    {
     cnt++;   //if seat no is not equal move forward
     temp=temp->next;
    }
    else
    {
     if(temp->flag==0)//if flag is zero that means seat is not booked.
     {
      strcpy(temp->movie_name,name);
      temp->flag=1;
      cout<<"\nEnter u r name:";  //Store all the user information for that book seat
      cin>>temp->name;
      cout<<"\nEnter u r mobile no: ";
      cin>>temp->mno;
      head[r]->cnt=head[r]->cnt+1; //increment the header counter by one
      cnt=0;  //make the counter zero for next booking of seat
      temp=head[r]->next; //point the temp first node of list for next booking seat.
      i++; //increment the indes of seat array for next seat booking.
      if(i==n)  //if all the seat gets book exit from the loop.
        break;   
     }
    }
   }
 }   
 if((temp->next==head[r]->next)) //Due to the above while condition last node is always out of the logic.
 {
  if(temp->flag==0)              //To store last node booking this code works.
  {
   strcpy(temp->movie_name,name);
   temp->flag=1;
   cout<<"\nEnter u r name:";
   cin>>temp->name;
   cout<<"\nEnter u r mobile no: ";
   cin>>temp->mno;
   head[r]->cnt=head[r]->cnt+1; //increment the header node counter by one.
  }
 }
 return 1; //return value 1 for successful completion of booking.
}


//Function : To cancel the theoter movie show logic is here..
//No of arguments passed : 03
//1. Row number 2. Number of Tickets 3.Movie name

int Cinemax::cancel_my_show(int r,int n,char name[20])
{
  cout<<"\nYour cancel request for "<<n <<" Tickets of "<<name<<" movie: \n";
  temp=head[r]->next;
  int max;
  max=head[r]->cnt; // store the no of nodes booked in row.
  if(max==-1) //check if the list is empty means no booking and still try to cancel.
  {
   cout<<"\nSorry there is no such seat avialable in this row for cancel..";
   return 0; //return 0 for unsuccessful try.
  }
  else
  {
   int seat[5],cnt=0,sn;
   for(i=0;i<n;i++) //Accept seat number from user to cancel the booking.
   {
    cout<<"\nEnter the seat no's: ";
    cin>>sn;
    seat[i]=sn-1; //Store cancel seat number in array seat[].
   }
   i=0;
   while(temp->next!=head[r]->next) //Check upto the last element of list
   {
    if(cnt!=seat[i])
    {
     cnt++;     //if seat number is not matches.
     temp=temp->next; // move to the next seat.
    }
    else
    {
     if(temp->flag==1) //if seat number matches check its flag if it is 1 that means seat is booked.
     {
      strcpy(temp->movie_name,"NIL"); // initialize all its feild to NIL value.
      temp->flag=0;                   // make it's flag 0 means not booked seat is vaccant for booking.
      strcpy(temp->name,"NIL");
      temp->mno=00;
      head[r]->cnt=head[r]->cnt-1;  //Decrement the header count by 1
      cnt=0;   //make the counter zero for next seat number to make it cancel.
      temp=head[r]->next; //point your temp to the first node of list.
      i++;  //increment i for the next seat number to cancel
      if(i==n)  //if all the seat gets cancel exit from the loop.
        break;   
     }
    }
   }
 }   
 if((temp->next==head[r]->next)) //Due to the above while condition last node is always out of the logic.
 {
  if(temp->flag==1)  //check the status of last node if flag is 1 means seat is booked and ready for cancel.
  {
   strcpy(temp->movie_name,"NIL");
   temp->flag=0;                    //make the flag 0 to indicate seat is vaccant.
   strcpy(temp->name,"NIL");
   temp->mno=00;                 //initialize all other value with NIL & ZERO.
   head[r]->cnt=head[r]->cnt-1;  //Decrement the header counter by one.
  }
 }
 return 1; //Return one for successful cancelletion.
}

//Function: To create the Doubly circular linked list for cinemax theoter booking
//no of arguments zero.

void Cinemax::create()
{
    node *f1;
    cout<<"\n\n!!!!!!!!!!!! Welcome To Cinemax Theoter!!!!!!!!!!\n";
    for(i=1;i<=10;i++)
    {
        p = new node;  // Allocate the memory for node
        p->next=NULL;   // initialize all feilds.
        p->prev=NULL;
        p->flag=0;
        strcpy(p->movie_name,"NIL");
        strcpy(p->name,"NIL");
        p->mno=0;

        if(head[i]->next==NULL)//check header next of each row if it null store this node as first node of that row
        {
         head[i]->next= p; //store the address of p in next feild of i th row header node.
         p->prev=p; //initially it's prev and next point to itself i:e p only.
         p->next=p;
        }
        //cout<<"\nAdding the row : "<<i <<" : information\n";

            temp=head[i]->next; // Here onwards we are adding the remaining six node in DCLL.
            f1=temp; //Storing the first node address in this pointer to point to the prev of first node.
            for(j=1;j<=6;j++)//wants to add six node
            {
                t1=new node; // Allocate memeory for node
                t1->flag=0;
                t1->mno=0;   //initialize all it's memory feilds.
                strcpy(t1->movie_name,"NIL");
                strcpy(t1->name,"NIL");
               
                t1->next=head[i]->next; //last node always points to the first node of list in DCLL.
                temp->next=t1; //join the new new node at end of list.
                t1->prev=temp; //new node prev is the previous node address of list.
                f1->prev=t1; //First node always points to the last node of list in DCLL.
                temp=t1; //make the new node (t1) as previous node (temp) for upcoming new node (t1).
            }
            //cout<<"\n Row Number : "<<i<<" : gets created....\n";
     }

}

//Function: To display the whole theoter booking status.
//how any seats are book or how many are vaccant.
//No of arguments zero.
void Cinemax::show()
{
    cout<<"Rows Status are as follows...\n";
    cout<<"\nHead Node\tCol1\t\tCol2\t\tCol3\t\tCol4\t\tCol5\t\tCol6\t\tCol7"; //To display column of the theator.
    for(i=1;i<=10;i++)//Total ten rows and each row seven seats we want to display.
    {
        cout<<"\nRow : "<<i;
        temp=head[i]->next; //Storing the address of i th row in temp to display.
         cout<<"[ "<<head[i]->cnt<<" ]--->"; //show no of nodes booked in the i th row.
        while(temp->next!=head[i]->next) //Travese upto the last node by this condition.
        {
         cout<<"[ "<<temp->flag<<"|"<<temp->movie_name<<"|"<<temp->name<<"]->"; //display flag value, name of movie & name of Ticket holder.
         temp=temp->next; //move towards the next seat.
        }
        if(temp->next==head[i]->next) //Due to the above while condition last node is out of code.
        {
         cout<<"[ "<<temp->flag<<"|"<<temp->movie_name<<"|"<<temp->name<<"]->";//displaying the last node containt.
        }
        cout<<"\n\n";
    }
}

int main()
{
    Cinemax c1; //object of cinemax theoter.
        int row,n,am,ch,amnt=150;
     char mname[20];
    c1.create(); //Function gets call to create the logical view of cinemax theoter.
    do
     {
    cout<< "\n!!!Cinemax Theator!!!" << endl; // prints !!!!!!
   
    cout<<"\n1.Book_my_Show\n2.Display Seat status\n3.Cancel_my_show"; //Show the options to choose.
   
    cout<<"\nEnter u R Choice: ";
    cin>>ch;
    switch(ch)
    {
     case 1:cout<<"\nWelcome To Cinemax Theator For Book your Show...\n";
        cout<<"\n Friday's Movies are as follows...\n";
        cout<<"\n1.Mohenjo_Daro\n2.Rustom\n3.Happy_Bag_Jayegi\n4.Bar_Bar_Dekho\n5.Akira\n6.Rangoon\n7.A Flying_Jatt.\n";
        cout<<"\nEnter u r movie name to book the show:(Note: space is not allowed in movie name)::  ";
                cin>>mname;
        c1.show();
        cout<<"\nEnter the row number to book u r ticket: ";
            cin>>row;
        cout<<"\nHow many Tickets u want to Book: ";
        cin>>n;
        am=c1.book_my_show(row,n,mname);
        if(am!=0)
        {
         c1.show();
         cout<<"\n\n Please pay the cash: u r total amount is: "<<amnt*n;;
         cout<<"\n\nYour booking is confirmed please see the status: ..\n\n";
                }
        else
        {
         cout<<"\n\nTry for another row...\n";
         }
                break;
         case 2:cout<<"\n The Booking status of the Cinemax Theator are as follows...\n\n";
        c1.show();
                break;
         case 3:cout<<"\nWelcome To Cinemax Theator For Cancel your Show...";
        cout<<"\nEnter u r movie name to cancel the show:(Note: space is not allowed in movie name)::  ";
                cin>>mname;
        c1.show();
        cout<<"\nEnter the row number to cancel u r ticket: ";
            cin>>row;
        cout<<"\nHow many Tickets u want to Cancel: ";
        cin>>n;
        am=c1.cancel_my_show(row,n,mname);
        if(am!=0)
        {
         c1.show();
         cout<<"\n\n Your total refund amount is: "<<((amnt*n)-50);;
         cout<<"\n\nYour booking is cancel please see the status: ..\n\n";
                }
        else
        {
         cout<<"\n\nTry for another row...\n";
         }
                break;
    }
     }while(ch!=4);
       
   
    return 0;
}// end of main function


/************************* OUTPUT OF CINEMAX THEATOR *****************************************************************************

[student@localhost Documents]$ g++ cinemax.cpp
cinemax.cpp:14:1: warning: ‘typedef’ was ignored in this declaration [enabled by default]
 };
 ^
cinemax.cpp:20:1: warning: ‘typedef’ was ignored in this declaration [enabled by default]
 };
 ^
[student@localhost Documents]$ ./a.out


!!!!!!!!!!!! Welcome To Cinemax Theoter!!!!!!!!!!

!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 1

Welcome To Cinemax Theator For Book your Show...

 Friday's Movies are as follows...

1.Mohenjo_Daro
2.Rustom
3.Happy_Bag_Jayegi
4.Bar_Bar_Dekho
5.Akira
6.Rangoon
7.A Flying_Jatt.

Enter u r movie name to book the show:(Note: space is not allowed in movie name)::  Akira
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to book u r ticket: 10

How many Tickets u want to Book: 2

You request for 2 Tickets of Akira movie:

Enter the seat no's: 2

Enter the seat no's: 4

Enter u r name:nitin

Enter u r mobile no: 9850562515

Enter u r name:Tejas

Enter u r mobile no: 9923511212
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 2 ]--->[ 0|NIL|NIL]->[ 1|Akira|nitin]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->



 Please pay the cash: u r total amount is: 300

Your booking is confirmed please see the status: ..


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 2

 The Booking status of the Cinemax Theator are as follows...

Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 2 ]--->[ 0|NIL|NIL]->[ 1|Akira|nitin]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 3

Welcome To Cinemax Theator For Cancel your Show...
Enter u r movie name to cancel the show:(Note: space is not allowed in movie name)::  Akira
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 2 ]--->[ 0|NIL|NIL]->[ 1|Akira|nitin]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to cancel u r ticket: 10

How many Tickets u want to Cancel: 1

Your cancel request for 1 Tickets of Akira movie:

Enter the seat no's: 2
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->



 Your total refund amount is: 100

Your booking is cancel please see the status: ..


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 2

 The Booking status of the Cinemax Theator are as follows...

Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 1

Welcome To Cinemax Theator For Book your Show...

 Friday's Movies are as follows...

1.Mohenjo_Daro
2.Rustom
3.Happy_Bag_Jayegi
4.Bar_Bar_Dekho
5.Akira
6.Rangoon
7.A Flying_Jatt.

Enter u r movie name to book the show:(Note: space is not allowed in movie name)::  Rustom
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to book u r ticket: 9

How many Tickets u want to Book: 3

You request for 3 Tickets of Rustom movie:

Enter the seat no's: 1

Enter the seat no's: 3

Enter the seat no's: 7

Enter u r name:Ram

Enter u r mobile no: 9823463223

Enter u r name:Sham

Enter u r mobile no: 8308115014

Enter u r name:Ganesh

Enter u r mobile no: 9923511414
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->



 Please pay the cash: u r total amount is: 450

Your booking is confirmed please see the status: ..


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 2

 The Booking status of the Cinemax Theator are as follows...

Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 1

Welcome To Cinemax Theator For Book your Show...

 Friday's Movies are as follows...

1.Mohenjo_Daro
2.Rustom
3.Happy_Bag_Jayegi
4.Bar_Bar_Dekho
5.Akira
6.Rangoon
7.A Flying_Jatt.

Enter u r movie name to book the show:(Note: space is not allowed in movie name)::  Rangoon
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to book u r ticket: 8

How many Tickets u want to Book: 7

You request for 7 Tickets of Rangoon movie:

Enter the seat no's: 1

Enter the seat no's: 2

Enter the seat no's: 3

Enter the seat no's: 4

Enter the seat no's: 5

Enter the seat no's: 6

Enter the seat no's: 7

Enter u r name:Simran

Enter u r mobile no: 9923511212

Enter u r name:Kaur

Enter u r mobile no: 9923511313

Enter u r name:Amit

Enter u r mobile no: 9850562525

Enter u r name:Shah

Enter u r mobile no: 8308115055

Enter u r name:lalu

Enter u r mobile no: 9923511234

Enter u r name:prasad

Enter u r mobile no: 9923511415

Enter u r name:Narendra

Enter u r mobile no: 9999888812
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 7 ]--->[ 1|Rangoon|Simran]->[ 1|Rangoon|Kaur]->[ 1|Rangoon|Amit]->[ 1|Rangoon|Shah]->[ 1|Rangoon|lalu]->[ 1|Rangoon|prasad]->[ 1|Rangoon|Narendra]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->



 Please pay the cash: u r total amount is: 1050

Your booking is confirmed please see the status: ..


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 1

Welcome To Cinemax Theator For Book your Show...

 Friday's Movies are as follows...

1.Mohenjo_Daro
2.Rustom
3.Happy_Bag_Jayegi
4.Bar_Bar_Dekho
5.Akira
6.Rangoon
7.A Flying_Jatt.

Enter u r movie name to book the show:(Note: space is not allowed in movie name)::  Akira
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 7 ]--->[ 1|Rangoon|Simran]->[ 1|Rangoon|Kaur]->[ 1|Rangoon|Amit]->[ 1|Rangoon|Shah]->[ 1|Rangoon|lalu]->[ 1|Rangoon|prasad]->[ 1|Rangoon|Narendra]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to book u r ticket: 8

How many Tickets u want to Book: 2

You request for 2 Tickets of Akira movie:

Sorry there is no seat avialable in this row..

Try for another row...

!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 3

Welcome To Cinemax Theator For Cancel your Show...
Enter u r movie name to cancel the show:(Note: space is not allowed in movie name)::  Rangoon
Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 7 ]--->[ 1|Rangoon|Simran]->[ 1|Rangoon|Kaur]->[ 1|Rangoon|Amit]->[ 1|Rangoon|Shah]->[ 1|Rangoon|lalu]->[ 1|Rangoon|prasad]->[ 1|Rangoon|Narendra]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Enter the row number to cancel u r ticket: 8

How many Tickets u want to Cancel: 1

Your cancel request for 1 Tickets of Akira movie:

Enter the seat no's: 7

Rows Status are as follows...

Head Node    Col1        Col2        Col3        Col4        Col5        Col6        Col7
Row : 1[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 2[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 3[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 4[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 5[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 6[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 7[ 0 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->


Row : 8[ 7 ]--->[ 1|Rangoon|Simran]->[ 1|Rangoon|Kaur]->[ 1|Rangoon|Amit]->[ 1|Rangoon|Shah]->[ 1|Rangoon|lalu]->[ 1|Rangoon|prasad]->[ 0|NIL|NIL]->


Row : 9[ 3 ]--->[ 1|Rustom|Ram]->[ 0|NIL|NIL]->[ 1|Rustom|Sham]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Rustom|Ganesh]->


Row : 10[ 1 ]--->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 1|Akira|Tejas]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->[ 0|NIL|NIL]->

Your total refund amount is: 100

Your booking is cancel please see the status: .


!!!Cinemax Theator!!!

1.Book_my_Show
2.Display Seat status
3.Cancel_my_show
Enter u R Choice: 4



**********************************************************************************************************************************/