SlideShare a Scribd company logo
1 of 7
#include<iostream .h>
#include<conio .h>
#include<string .h>
#include<stdio .h>
#include<process .h>
#include<iomanip .h>
#include<dos .h>
main()
{
clrscr();
unsigned int sum,add,d,i,j,e,f,g,h,k,l,w,x,y,z;
unsigned int bir=10,per=36,der=110,mur=8,par=110,cor=90,twr=1199,
lur=17,tir=107, rer=1499;
int
qubis=1000,abis=0,qupep=1000,apep=0,quden=110,aden=0,qumun=1000,amun=0,quperk=50
0,aperk=0,qucoc=400,acoc=0,qutit=100,atit=0,qulux=1000,alux=0,qutid=1000,atid=0,
quree=300,aree=0;
unsigned int m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;
char name[50],rank[10],pu,c[20],a[15],b[15],ok;
main:;
{cout<<"nnnttt
ALADIN CANTEEN MANAGEMENT";
cout<<"nnnCONSUMER INFORMATION";
cout<<"nnnn NAME:";
gets(name);
cout<<"n RANK:";
gets(rank);
cout<<"n SERVICE NO.:";
cin>>a;
cout<<"n SMART CARD NO.:";
cin>>b;
cout<<"n PHONE NO.:";
cin>>c;
cout<<"n ENTER BILL NO.:";
cin>>i;
again:;
clrscr();
cout<<"nnnn1.MENU & PURCHASE";
cout<<"nnn2.DETAILS";
cout<<"nnn3.NEW CUSTOMER";
cout<<"nnn4.QUANTITY AVAILABLE";
cout<<"nnn5.EXIT";
cout<<"nnnENTER YOUR CHOICE:";
cin>>d;
clrscr();
switch(d)
{
case 1:
cout<<"nITEMSttttttt
RATE(RS)";
cout<<"nnnBISCUTEtttttttt10 ";
cout<<"nnPEPSODENTttttttt36";
cout<<"nnDENIM POWDERttttttt110
";
cout<<"nnMUNCHtttttttt8 ";
cout<<"nnPARK AVENUE PERFUMEtttttt110
";
cout<<"nnCOCONUT HAIR OILtttttt90 ";
cout<<"nnTITAN WATCHttttttt1199
";
cout<<"nnLUX SOAPttttttt17
";
cout<<"nnTIDEtttttttt107
";
cout<<"nnREEBOK SHOESttttttt1499
";
start:
cout<<"nnnDO YOU WANT TO PURCHASE(Y/N):n";
cin>>pu;
if(pu=='Y'||pu=='y')
{switch(pu)
case 1:
clrscr();
cout<<"nnnttttPURCHASE LIST";
bis:;
cout<<"nBISCUTE(MAX 30): ";
cin>>m;
if(m>30)
{
cout<<"Enter Quantity Smaller than 30";
getch();
goto bis;
}
else
abis=qubis-m;
pep:;
cout<<"nPEPSODENT(MAX 2): ";
cin>>n;
if(n>2)
{
cout<<"Enter Quantity Smaller than 2";
getch();
goto pep;
}
else
apep=qupep-n;
den:;
cout<<"nDENIM POWDER(MAX 2): ";
cin>>o;
if(o>2)
{
cout<<"Enter Quantity Smaller then 2";
getch();
goto den;
}
else
aden=quden-o;
mun:;
cout<<"nMUNCH(MAX 50): ";
cin>>p;
if(p>50)
{
cout<<"Enter Quantity Smaller then 50";
getch();
goto mun;
}
else
amun=qumun-p;
park:;
cout<<"nPARK AVENUE PERFUME(MAX 2): ";
cin>>q;
if(q>2)
{
cout<<"Enter Quantity Smaller then 2";
getch();
goto park;
}
else
aperk=quperk-q;
coco:;
cout<<"nCOCONUT HAIR OIL(MAX 2): ";
cin>>r;
if(r>2)
{
cout<<"Enter Quantity Smaller then 2";
getch();
goto coco;
}
else
acoc=qucoc-r;
titan:;
cout<<"nTITAN WATCH(MAX 2): ";
cin>>s;
if(s>2)
{
cout<<"Enter Quantity Smaller then 2";
getch();
goto titan;
}
else
atit=qutit-s;
lux:;
cout<<"nLUX SOAP(MAX 10): ";
cin>>t;
if(t>10)
{
cout<<"Enter Quantity Smaller then 10";
getch();
goto lux;
}
else
alux=qulux-t;
tid:;
cout<<"nTIDE(MAX 2): ";
cin>>u;
if(u>2)
{
cout<<"Enter Quantity Smaller then 2";
getch();
goto tid;
}
else
atid=qutid-u;
ree:;
cout<<"nREEBOK SHOES(MAX 4): ";
cin>>v;
if(v>4)
{
cout<<"Enter Quantity Smaller then 4";
getch();
goto ree;
}
else
aree=quree-v;
cout<<"n";
clrscr();
cout<<"nnnnnnttttALADIN CANTEENn";
cout<<"nntttt CASH MEMOn";
cout<<"nnBILL NO.:"<<i;
cout<<"nnNAME:";
cout<<name;
cout<<"nnRANK:"<<rank;
cout<<"nnSERVICE NO.:"<<a;
cout<<"nnSMART CARD NO.:"<<b;
cout<<"nnPHONE NO.:"<<c;
cout<<"nnnnn";
cout<<"=========================================================================
======";
cout<<"nITEMS"
<<setw(40)<<"QUANTITY"<<setw(35)<<"PRICE(Rs.)";
cout<<"=========================================================================
======";
if(m>0)
cout<<"nnBISCUTE"
<<setw(38)<<m<<setw(28)<<"Rs."<<m*bir;
if(n>0)
cout<<"nnPEPSODENT"
<<setw(36)<<n<<setw(28)<<"Rs."<<n*per;
if(o>0)
cout<<"nnDENIM POWDER"
<<setw(33)<<o<<setw(28)<<"Rs."<<o*der;
if(p>0)
cout<<"nnMUNCH"
<<setw(40)<<p<<setw(28)<<"Rs."<<p*mur;
if(q>0)
cout<<"nnPARK AVENUE PERFUME"<<setw(26)<<q<<setw(28)<<"Rs."<<q*par;
if(r>0)
cout<<"nnCOCONUT HAIR OIL" <<setw(29)<<r<<setw(28)<<"Rs."<<r*cor;
if(s>0)
cout<<"nnTITAN WATCH"
<<setw(34)<<s<<setw(28)<<"Rs."<<s*twr;
if(t>0)
cout<<"nnLUX SOAP"
<<setw(37)<<t<<setw(28)<<"Rs."<<t*lur;
if(u>0)
cout<<"nnTIDE"
<<setw(41)<<u<<setw(28)<<"Rs."<<u*tir;
if(v>0)
cout<<"nnREEBOK SHOES"
<<setw(33)<<v<<setw(28)<<"Rs."<<v*rer;
e=m*bir;
f=n*per;
g=o*der;
h=p*mur;
k=q*par;
l=r*cor;
w=s*twr;
x=t*lur;
y=u*tir;
z=v*rer;
sum=e+f+g+h+k+l+w+x+y+z;
add=m+n+o+p+q+r+s+t+u+v;
cout<<"n=======================================================================
========";
cout<<"nTOTAL:"<<setw(40)<<add<<setw(27)<<"Rs."<<sum;
cout<<"nnTHANK YOU .ttt
VISIT US AGAINn";
getch();
clrscr();
goto again;
}
else
{goto again;
}
case 2:
cout<<"nnnnnttttCANTEEN DETAILS";
cout<<"nn#TIMING:nn 11 AM TO 02 PM n 03 PM TO 05 PM";
cout<<"nn#CANTEEN WILL CLOSED ON TUESDAY";
cout<<"nn#GOODS ONCE SOLD WILL NOT BE EXCHANGED/REPLACED";
cout<<"nn#TAKE YOUR SMART CARD WITH YOU";
cout<<"nn#COLLECT YOUR SMART CARD & BILL AFTER PAYMENT";
cout<<"nn#DO NOT BREAK ANY CANTEEN ITEMS";
getch();
clrscr();
goto again;
case 3:
goto main;
case 4:
if(m>0||n>0||o>0||p>0||q>0||r>0||s>0||t>0||u>0||v>0)
{cout<<"ntttItems Avaliable in Canteen.nnn";
cout<<"=========================================================================
======";
cout<<"nITEMS"
<<setw(40)<<"QUANTITY";
cout<<"n=======================================================================
========";
cout<<"nnnBISCUTE"
<<setw(38)<<abis;
cout<<"nnnPEPSODENT"
<<setw(36)<<apep;
cout<<"nnnDENIM POWDER"
<<setw(33)<<aden;
cout<<"nnnMUNCH"
<<setw(40)<<amun;
cout<<"nnnPARK AVENUE PERFUME"<<setw(26)<<aperk;
cout<<"nnnCOCONUT HAIR OIL" <<setw(29)<<acoc;
cout<<"nnnTITAN WATCH"
<<setw(34)<<atit;
cout<<"nnnLUX SOAP"
<<setw(37)<<alux;
cout<<"nnnTIDE"
<<setw(41)<<atid;
cout<<"nnnREEBOK SHOES"
<<setw(33)<<aree;
cout<<"n***********************************************************************
********";
getch();
goto again;
}
else
{{cout<<"ntttItems Avaliable in Canteen.nnn";
cout<<"=========================================================================
======";
cout<<"nITEMS"
<<setw(40)<<"QUANTITY";
cout<<"n=======================================================================
========";
cout<<"nnnBISCUTE"
<<setw(38)<<qubis;
cout<<"nnnPEPSODENT"
<<setw(36)<<qupep;
cout<<"nnnDENIM POWDER"
<<setw(33)<<quden;
cout<<"nnnMUNCH"
<<setw(40)<<qumun;
cout<<"nnnPARK AVENUE PERFUME"<<setw(26)<<quperk;
cout<<"nnnCOCONUT HAIR OIL" <<setw(29)<<qucoc;
cout<<"nnnTITAN WATCH"
<<setw(34)<<qutit;
cout<<"nnnLUX SOAP"
<<setw(37)<<qulux;
cout<<"nnnTIDE"
<<setw(41)<<qutid;
cout<<"nnnREEBOK SHOES"
<<setw(33)<<quree;
cout<<"nn*********************************************************************
**********";
getch();
goto again;
}
case 5:
cout<<"nnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
tttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnntPress any key to Exit.......";
getch();
exit(0);
default:
cout<<"Your choice is wrong";
getch();
goto again;
}
}
}
}
cout<<"nnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
tttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
nnntttt
THANKS";
sleep(1);
clrscr();
cout<<"nnnnnnnnnnntPress any key to Exit.......";
getch();
exit(0);
default:
cout<<"Your choice is wrong";
getch();
goto again;
}
}
}
}

More Related Content

What's hot

Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacionJeff Tu Pechito
 
CS50 Lecture1
CS50 Lecture1CS50 Lecture1
CS50 Lecture1昀 李
 
メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割Koichiro Eto
 
Diploma - French Diploma
Diploma - French DiplomaDiploma - French Diploma
Diploma - French DiplomaIlham Aminuddin
 
New text document
New text documentNew text document
New text documentPavel111212
 
Javasccript MV* frameworks
Javasccript MV* frameworksJavasccript MV* frameworks
Javasccript MV* frameworksKerry Buckley
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swiftChiwon Song
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009Jordan Baker
 
C++ Lambda and concurrency
C++ Lambda and concurrencyC++ Lambda and concurrency
C++ Lambda and concurrency명신 김
 
Τα Πολύ Βασικά για την Python
Τα Πολύ Βασικά για την PythonΤα Πολύ Βασικά για την Python
Τα Πολύ Βασικά για την PythonMoses Boudourides
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - HarshHarsh Sharma
 

What's hot (13)

Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacion
 
CS50 Lecture1
CS50 Lecture1CS50 Lecture1
CS50 Lecture1
 
メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割
 
Ssaw08 0624
Ssaw08 0624Ssaw08 0624
Ssaw08 0624
 
Diploma - French Diploma
Diploma - French DiplomaDiploma - French Diploma
Diploma - French Diploma
 
New text document
New text documentNew text document
New text document
 
Javasccript MV* frameworks
Javasccript MV* frameworksJavasccript MV* frameworks
Javasccript MV* frameworks
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swift
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009
 
C++ Lambda and concurrency
C++ Lambda and concurrencyC++ Lambda and concurrency
C++ Lambda and concurrency
 
Τα Πολύ Βασικά για την Python
Τα Πολύ Βασικά για την PythonΤα Πολύ Βασικά για την Python
Τα Πολύ Βασικά για την Python
 
Combinator parsing
Combinator parsingCombinator parsing
Combinator parsing
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - Harsh
 

Viewers also liked

Program to find factorial of a number
Program to find factorial of a numberProgram to find factorial of a number
Program to find factorial of a numberSwarup Boro
 
Program to find the avg of two numbers
Program to find the avg of two numbersProgram to find the avg of two numbers
Program to find the avg of two numbersSwarup Boro
 
Program to sort array using insertion sort
Program to sort array using insertion sortProgram to sort array using insertion sort
Program to sort array using insertion sortSwarup Boro
 
Program using function overloading
Program using function overloadingProgram using function overloading
Program using function overloadingSwarup Boro
 
Study of Diffusion of solids in Liquids
Study of Diffusion of solids in Liquids                                 Study of Diffusion of solids in Liquids
Study of Diffusion of solids in Liquids Swarup Boro
 

Viewers also liked (8)

Program to find factorial of a number
Program to find factorial of a numberProgram to find factorial of a number
Program to find factorial of a number
 
Exposicion matema titicas
Exposicion matema titicasExposicion matema titicas
Exposicion matema titicas
 
Program to find the avg of two numbers
Program to find the avg of two numbersProgram to find the avg of two numbers
Program to find the avg of two numbers
 
1D Array
1D Array1D Array
1D Array
 
Seminario 2014 iii
Seminario 2014 iiiSeminario 2014 iii
Seminario 2014 iii
 
Program to sort array using insertion sort
Program to sort array using insertion sortProgram to sort array using insertion sort
Program to sort array using insertion sort
 
Program using function overloading
Program using function overloadingProgram using function overloading
Program using function overloading
 
Study of Diffusion of solids in Liquids
Study of Diffusion of solids in Liquids                                 Study of Diffusion of solids in Liquids
Study of Diffusion of solids in Liquids
 

Similar to Canteen management program

Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Santiago Sarmiento
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Er Ritu Aggarwal
 
Bank management system project in c++ with graphics
Bank management system project in c++ with graphicsBank management system project in c++ with graphics
Bank management system project in c++ with graphicsVtech Academy of Computers
 
#include stdio.h #include stdlib.h #include time.hdouble.pdf
#include stdio.h #include stdlib.h #include time.hdouble.pdf#include stdio.h #include stdlib.h #include time.hdouble.pdf
#include stdio.h #include stdlib.h #include time.hdouble.pdfarjunchetri1
 
Assignment_URI_Code_Solution_Roll_2010052 (1).pdf
Assignment_URI_Code_Solution_Roll_2010052 (1).pdfAssignment_URI_Code_Solution_Roll_2010052 (1).pdf
Assignment_URI_Code_Solution_Roll_2010052 (1).pdfSamiulHaque58
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Dr. Volkan OBAN
 
#includeiostream#includecctypeusing namespace std;cl.docx
#includeiostream#includecctypeusing namespace std;cl.docx#includeiostream#includecctypeusing namespace std;cl.docx
#includeiostream#includecctypeusing namespace std;cl.docxkatherncarlyle
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212Mahmoud Samir Fayed
 
Computer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commandsComputer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commandsVishvjeet Yadav
 
Code sources des fonctions table cp
Code sources des fonctions table cpCode sources des fonctions table cp
Code sources des fonctions table cpidhem110
 

Similar to Canteen management program (20)

Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02
 
Bank management system project in c++ with graphics
Bank management system project in c++ with graphicsBank management system project in c++ with graphics
Bank management system project in c++ with graphics
 
#include stdio.h #include stdlib.h #include time.hdouble.pdf
#include stdio.h #include stdlib.h #include time.hdouble.pdf#include stdio.h #include stdlib.h #include time.hdouble.pdf
#include stdio.h #include stdlib.h #include time.hdouble.pdf
 
C code
C codeC code
C code
 
Assignment_URI_Code_Solution_Roll_2010052 (1).pdf
Assignment_URI_Code_Solution_Roll_2010052 (1).pdfAssignment_URI_Code_Solution_Roll_2010052 (1).pdf
Assignment_URI_Code_Solution_Roll_2010052 (1).pdf
 
Cpp c++ 1
Cpp c++ 1Cpp c++ 1
Cpp c++ 1
 
Os 2 cycle
Os 2 cycleOs 2 cycle
Os 2 cycle
 
Coding
CodingCoding
Coding
 
Lab Question
Lab QuestionLab Question
Lab Question
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
 
#includeiostream#includecctypeusing namespace std;cl.docx
#includeiostream#includecctypeusing namespace std;cl.docx#includeiostream#includecctypeusing namespace std;cl.docx
#includeiostream#includecctypeusing namespace std;cl.docx
 
Cpp programs
Cpp programsCpp programs
Cpp programs
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
String
StringString
String
 
Computer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commandsComputer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commands
 
Code sources des fonctions table cp
Code sources des fonctions table cpCode sources des fonctions table cp
Code sources des fonctions table cp
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
20DCE096_prac8.pdf
20DCE096_prac8.pdf20DCE096_prac8.pdf
20DCE096_prac8.pdf
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 

More from Swarup Boro

Concatenation of two strings using class in c++
Concatenation of two strings using class in c++Concatenation of two strings using class in c++
Concatenation of two strings using class in c++Swarup Boro
 
Program: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 studentsProgram: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 studentsSwarup Boro
 
Array using recursion
Array using recursionArray using recursion
Array using recursionSwarup Boro
 
Binary addition using class concept in c++
Binary addition using class concept in c++Binary addition using class concept in c++
Binary addition using class concept in c++Swarup Boro
 
C++ program using class
C++ program using classC++ program using class
C++ program using classSwarup Boro
 
Railway reservation
Railway reservationRailway reservation
Railway reservationSwarup Boro
 
Constructor & destructor
Constructor & destructorConstructor & destructor
Constructor & destructorSwarup Boro
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functionsSwarup Boro
 
Structures in c++
Structures in c++Structures in c++
Structures in c++Swarup Boro
 
Implementation of oop concept in c++
Implementation of oop concept in c++Implementation of oop concept in c++
Implementation of oop concept in c++Swarup Boro
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tourSwarup Boro
 
Computer communication and networks
Computer communication and networks Computer communication and networks
Computer communication and networks Swarup Boro
 

More from Swarup Boro (19)

Concatenation of two strings using class in c++
Concatenation of two strings using class in c++Concatenation of two strings using class in c++
Concatenation of two strings using class in c++
 
Program: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 studentsProgram: Inheritance in Class - to find topper out of 10 students
Program: Inheritance in Class - to find topper out of 10 students
 
Array using recursion
Array using recursionArray using recursion
Array using recursion
 
Binary addition using class concept in c++
Binary addition using class concept in c++Binary addition using class concept in c++
Binary addition using class concept in c++
 
C++ program using class
C++ program using classC++ program using class
C++ program using class
 
Railway reservation
Railway reservationRailway reservation
Railway reservation
 
Boolean
BooleanBoolean
Boolean
 
Classes
ClassesClasses
Classes
 
Constructor & destructor
Constructor & destructorConstructor & destructor
Constructor & destructor
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
Pointers
PointersPointers
Pointers
 
Queue
QueueQueue
Queue
 
Structures in c++
Structures in c++Structures in c++
Structures in c++
 
Stack
StackStack
Stack
 
Functions
FunctionsFunctions
Functions
 
Implementation of oop concept in c++
Implementation of oop concept in c++Implementation of oop concept in c++
Implementation of oop concept in c++
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tour
 
Computer communication and networks
Computer communication and networks Computer communication and networks
Computer communication and networks
 
2D Array
2D Array2D Array
2D Array
 

Recently uploaded

Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 

Recently uploaded (20)

INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 

Canteen management program

  • 1. #include<iostream .h> #include<conio .h> #include<string .h> #include<stdio .h> #include<process .h> #include<iomanip .h> #include<dos .h> main() { clrscr(); unsigned int sum,add,d,i,j,e,f,g,h,k,l,w,x,y,z; unsigned int bir=10,per=36,der=110,mur=8,par=110,cor=90,twr=1199, lur=17,tir=107, rer=1499; int qubis=1000,abis=0,qupep=1000,apep=0,quden=110,aden=0,qumun=1000,amun=0,quperk=50 0,aperk=0,qucoc=400,acoc=0,qutit=100,atit=0,qulux=1000,alux=0,qutid=1000,atid=0, quree=300,aree=0; unsigned int m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0; char name[50],rank[10],pu,c[20],a[15],b[15],ok; main:; {cout<<"nnnttt ALADIN CANTEEN MANAGEMENT"; cout<<"nnnCONSUMER INFORMATION"; cout<<"nnnn NAME:"; gets(name); cout<<"n RANK:"; gets(rank); cout<<"n SERVICE NO.:"; cin>>a; cout<<"n SMART CARD NO.:"; cin>>b; cout<<"n PHONE NO.:"; cin>>c; cout<<"n ENTER BILL NO.:"; cin>>i; again:; clrscr(); cout<<"nnnn1.MENU & PURCHASE"; cout<<"nnn2.DETAILS"; cout<<"nnn3.NEW CUSTOMER"; cout<<"nnn4.QUANTITY AVAILABLE"; cout<<"nnn5.EXIT"; cout<<"nnnENTER YOUR CHOICE:"; cin>>d; clrscr(); switch(d) { case 1: cout<<"nITEMSttttttt RATE(RS)"; cout<<"nnnBISCUTEtttttttt10 "; cout<<"nnPEPSODENTttttttt36"; cout<<"nnDENIM POWDERttttttt110 "; cout<<"nnMUNCHtttttttt8 "; cout<<"nnPARK AVENUE PERFUMEtttttt110 "; cout<<"nnCOCONUT HAIR OILtttttt90 "; cout<<"nnTITAN WATCHttttttt1199 "; cout<<"nnLUX SOAPttttttt17 "; cout<<"nnTIDEtttttttt107 "; cout<<"nnREEBOK SHOESttttttt1499 "; start: cout<<"nnnDO YOU WANT TO PURCHASE(Y/N):n"; cin>>pu; if(pu=='Y'||pu=='y')
  • 2. {switch(pu) case 1: clrscr(); cout<<"nnnttttPURCHASE LIST"; bis:; cout<<"nBISCUTE(MAX 30): "; cin>>m; if(m>30) { cout<<"Enter Quantity Smaller than 30"; getch(); goto bis; } else abis=qubis-m; pep:; cout<<"nPEPSODENT(MAX 2): "; cin>>n; if(n>2) { cout<<"Enter Quantity Smaller than 2"; getch(); goto pep; } else apep=qupep-n; den:; cout<<"nDENIM POWDER(MAX 2): "; cin>>o; if(o>2) { cout<<"Enter Quantity Smaller then 2"; getch(); goto den; } else aden=quden-o; mun:; cout<<"nMUNCH(MAX 50): "; cin>>p; if(p>50) { cout<<"Enter Quantity Smaller then 50"; getch(); goto mun; } else amun=qumun-p; park:; cout<<"nPARK AVENUE PERFUME(MAX 2): "; cin>>q; if(q>2) { cout<<"Enter Quantity Smaller then 2"; getch(); goto park; } else aperk=quperk-q; coco:; cout<<"nCOCONUT HAIR OIL(MAX 2): ";
  • 3. cin>>r; if(r>2) { cout<<"Enter Quantity Smaller then 2"; getch(); goto coco; } else acoc=qucoc-r; titan:; cout<<"nTITAN WATCH(MAX 2): "; cin>>s; if(s>2) { cout<<"Enter Quantity Smaller then 2"; getch(); goto titan; } else atit=qutit-s; lux:; cout<<"nLUX SOAP(MAX 10): "; cin>>t; if(t>10) { cout<<"Enter Quantity Smaller then 10"; getch(); goto lux; } else alux=qulux-t; tid:; cout<<"nTIDE(MAX 2): "; cin>>u; if(u>2) { cout<<"Enter Quantity Smaller then 2"; getch(); goto tid; } else atid=qutid-u; ree:; cout<<"nREEBOK SHOES(MAX 4): "; cin>>v; if(v>4) { cout<<"Enter Quantity Smaller then 4"; getch(); goto ree; } else aree=quree-v; cout<<"n"; clrscr(); cout<<"nnnnnnttttALADIN CANTEENn"; cout<<"nntttt CASH MEMOn"; cout<<"nnBILL NO.:"<<i;
  • 4. cout<<"nnNAME:"; cout<<name; cout<<"nnRANK:"<<rank; cout<<"nnSERVICE NO.:"<<a; cout<<"nnSMART CARD NO.:"<<b; cout<<"nnPHONE NO.:"<<c; cout<<"nnnnn"; cout<<"========================================================================= ======"; cout<<"nITEMS" <<setw(40)<<"QUANTITY"<<setw(35)<<"PRICE(Rs.)"; cout<<"========================================================================= ======"; if(m>0) cout<<"nnBISCUTE" <<setw(38)<<m<<setw(28)<<"Rs."<<m*bir; if(n>0) cout<<"nnPEPSODENT" <<setw(36)<<n<<setw(28)<<"Rs."<<n*per; if(o>0) cout<<"nnDENIM POWDER" <<setw(33)<<o<<setw(28)<<"Rs."<<o*der; if(p>0) cout<<"nnMUNCH" <<setw(40)<<p<<setw(28)<<"Rs."<<p*mur; if(q>0) cout<<"nnPARK AVENUE PERFUME"<<setw(26)<<q<<setw(28)<<"Rs."<<q*par; if(r>0) cout<<"nnCOCONUT HAIR OIL" <<setw(29)<<r<<setw(28)<<"Rs."<<r*cor; if(s>0) cout<<"nnTITAN WATCH" <<setw(34)<<s<<setw(28)<<"Rs."<<s*twr; if(t>0) cout<<"nnLUX SOAP" <<setw(37)<<t<<setw(28)<<"Rs."<<t*lur; if(u>0) cout<<"nnTIDE" <<setw(41)<<u<<setw(28)<<"Rs."<<u*tir; if(v>0) cout<<"nnREEBOK SHOES" <<setw(33)<<v<<setw(28)<<"Rs."<<v*rer; e=m*bir; f=n*per; g=o*der; h=p*mur; k=q*par; l=r*cor; w=s*twr; x=t*lur; y=u*tir; z=v*rer; sum=e+f+g+h+k+l+w+x+y+z; add=m+n+o+p+q+r+s+t+u+v; cout<<"n======================================================================= ========"; cout<<"nTOTAL:"<<setw(40)<<add<<setw(27)<<"Rs."<<sum; cout<<"nnTHANK YOU .ttt VISIT US AGAINn"; getch(); clrscr(); goto again; } else {goto again; } case 2: cout<<"nnnnnttttCANTEEN DETAILS";
  • 5. cout<<"nn#TIMING:nn 11 AM TO 02 PM n 03 PM TO 05 PM"; cout<<"nn#CANTEEN WILL CLOSED ON TUESDAY"; cout<<"nn#GOODS ONCE SOLD WILL NOT BE EXCHANGED/REPLACED"; cout<<"nn#TAKE YOUR SMART CARD WITH YOU"; cout<<"nn#COLLECT YOUR SMART CARD & BILL AFTER PAYMENT"; cout<<"nn#DO NOT BREAK ANY CANTEEN ITEMS"; getch(); clrscr(); goto again; case 3: goto main; case 4: if(m>0||n>0||o>0||p>0||q>0||r>0||s>0||t>0||u>0||v>0) {cout<<"ntttItems Avaliable in Canteen.nnn"; cout<<"========================================================================= ======"; cout<<"nITEMS" <<setw(40)<<"QUANTITY"; cout<<"n======================================================================= ========"; cout<<"nnnBISCUTE" <<setw(38)<<abis; cout<<"nnnPEPSODENT" <<setw(36)<<apep; cout<<"nnnDENIM POWDER" <<setw(33)<<aden; cout<<"nnnMUNCH" <<setw(40)<<amun; cout<<"nnnPARK AVENUE PERFUME"<<setw(26)<<aperk; cout<<"nnnCOCONUT HAIR OIL" <<setw(29)<<acoc; cout<<"nnnTITAN WATCH" <<setw(34)<<atit; cout<<"nnnLUX SOAP" <<setw(37)<<alux; cout<<"nnnTIDE" <<setw(41)<<atid; cout<<"nnnREEBOK SHOES" <<setw(33)<<aree; cout<<"n*********************************************************************** ********"; getch(); goto again; } else {{cout<<"ntttItems Avaliable in Canteen.nnn"; cout<<"========================================================================= ======"; cout<<"nITEMS" <<setw(40)<<"QUANTITY"; cout<<"n======================================================================= ========"; cout<<"nnnBISCUTE" <<setw(38)<<qubis; cout<<"nnnPEPSODENT" <<setw(36)<<qupep; cout<<"nnnDENIM POWDER" <<setw(33)<<quden; cout<<"nnnMUNCH" <<setw(40)<<qumun; cout<<"nnnPARK AVENUE PERFUME"<<setw(26)<<quperk; cout<<"nnnCOCONUT HAIR OIL" <<setw(29)<<qucoc; cout<<"nnnTITAN WATCH" <<setw(34)<<qutit; cout<<"nnnLUX SOAP" <<setw(37)<<qulux; cout<<"nnnTIDE" <<setw(41)<<qutid; cout<<"nnnREEBOK SHOES" <<setw(33)<<quree; cout<<"nn********************************************************************* **********"; getch(); goto again; } case 5: