Professional Documents
Culture Documents
Bio-Data: NAME-saurabh Verma Class - Xi-D Roll No. - 47
Bio-Data: NAME-saurabh Verma Class - Xi-D Roll No. - 47
Bio-Data: NAME-saurabh Verma Class - Xi-D Roll No. - 47
BIO-DATA
Project file
2017-18
Sign:
P age |2
game
ManageMent
system
P age |3
Source Code
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
#include<iomanip.h>
#include<string.h>
#include<stdio.h>
int c=0;
struct date
{
int d,m,y;
};
struct GAME
{
int accno;
char title[50];
int copies,issued;
float price;
P age |4
date doa;
}b[50];
void Gameinfo()
{
cout<<"S.No. Acc.No Title Copies Issued Price DOA";
}
cout<<endl<<setw(4)<<i+1<<setw(9)<<b[i].accno<<setw(15)<<b[i].t
itle<<setw(8)<<b[i].copies<<setw(9)<<b[i].issued<<setw(8)<<b[i].pr
ice<<setw(13)
<<b[i].doa.d<<"\\"<<b[i].doa.m<<"\\"<<b[i].doa.y;
}
getch();
}
void search_a(int a)
{
int w=0;
clrscr();
cout<<"\t\t\t\tSearch Results\n";
for(int i=0;i<c;i++)
{
P age |6
if(a==b[i].accno)
{
cout<<"Acc. No. : "<<b[i].accno<<"\nTitle : "<<b[i].title<<
"\nCopies : "<<b[i].copies<<"\nCopies Issued:
"<<b[i].issued<<"\nPrice : "<<b[i].price<<
"\nDate of Issue:
"<<b[i].doa.d<<"\\"<<b[i].doa.m<<"\\"<<b[i].doa.y;
w++;
}
}
if(w==0)
cout<<"GAME not Found ";
getch();
}
void issue(int a)
{
int o=0;
for(int i=0;i<c;i++)
{
if(a==b[i].accno)
{
o++;
if(b[i].copies-b[i].issued>0)
{
P age |8
cout<<"Issued";
b[i].issued++;
}
else
cout<<"\n Out of Stock";
}
}
if(o==0)
cout<<"GAME n ot Found";
getch();
}
void returnb(int a)
{
int r=0;
for(int i=0;i<c;i++)
{
if(a==b[i].accno)
{
b[i].issued--;
cout<<"\n Successfully Returned ";
r++;
P age |9
}
}
if(r==0)
cout<<"\n Invalid Input ";
getch();
}
void main()
{
clrscr();
int ch;
do
{ cout<<"\n\t\t\t\tGame Management System\n\n\t\t\t\t 1-Create
GAME List \n\t\t\t\t 2-Display Catalogue \n\t\t\t\t 3-Search a GAME
\n\t\t\t\t 4-Issue a GAME \n\t\t\t\t 5-Return a GAME \n\t\t\t\t 6-Exit
\n\n Enter you choice: ";
cin>>ch;
clrscr();
switch(ch)
{
case 1: char x;
do
{ input(b[c++]);
P a g e | 10
case 2: catalog(b,c);
break;
case 3: int v;
cout<<"\n 1-Search by accession number \n 2-Search by GAME
name \n 3-Search by MAKER name \n Enter your choice ";
cin>>v;
switch(v)
{
case 1: cout<<"Enter the accession number ";
int a;
cin>>a;
search_a(a);
break;
gets(m);
search_b(m);
break;
case 6: exit(0);
}
clrscr();
}
while(ch!=6);
getch();
}
P a g e | 13
Output
P a g e | 14
P a g e | 15
P a g e | 16
P a g e | 17
Bibliography