insert and delete queue in C++ (queue operation)
=======================================
# include<iostream.h>
# include<conio.h>
# include<string.h>
# include<ctype.h>
# include<process.h>
# define size 10
class Queue
{
public: int rear, front;
int ch;
int q[size];
public: Queue()
{
rear = front = 0;
}
void Insert_queue();
void Delete_queue();
void Display_queue();
};
// Function to create queue
void Queue :: Insert_queue()
{
cout<<"\n Input the element :";
cin>>ch;
if(rear < size)
{
rear ++;
q[rear] = ch ;
if(front == 0)
front = 1;
}
else
cout<<"\nOverflow";
}
// Function to perform delete operation
void Queue :: Delete_queue() //char q[], char ch)
{
if (front == 0)
{
cout<<"\nUnderflow";
return ;
}
else
{
ch = q[front];
cout<<"\nElement deleted :"<<ch;
}
if(front == rear)
{
front = 0;
rear = 0;
}
else
front = front + 1;
}
// Output function
void Queue :: Display_queue() //char q[])
{
if (front == 0)
return;
for( int i = front ; i <= rear; i++)
cout<<" "<<q[i];
}
//Function main
void main()
{
Queue Q;
int k = 0;
char choice;
do
{
cout<<"\nInsert->i Delete->d Quit->q:";
cout<<"\nInput the choice : ";
do
{
cin>>choice;
choice = tolower(choice);
}
while(strchr("idq",choice)==NULL);
cout<<"Your choice is ->"<<choice;
switch(choice)
{
case 'i' :
Q.Insert_queue();
cout<<"\nQueue after inserting ";
Q.Display_queue();
break;
case 'd' :
Q.Delete_queue();
cout<<"\nQueue content after deleteion is as follows:\n";
Q.Display_queue();
break;
case 'q':
k = 1;
}
}
while(!k);
}
24 comments:
Predilection casinos? reading this open [url=http://www.realcazinoz.com]casino[/url] commander and aside online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also probe our untrained [url=http://freecasinogames2010.webs.com]casino[/url] advert at http://freecasinogames2010.webs.com and be the victor in true folding readies !
another exhibitionist [url=http://www.ttittancasino.com]casino spiele[/url] place is www.ttittancasino.com , pro german gamblers, submit c be communicated since manumitted online casino bonus.
I would appreciate more visual materials, to make your blog more attractive, but your writing style really compensates it. But there is always place for improvement
You have tested it and writing form your personal experience or you find some information online?
who is oprah dating http://loveepicentre.com/articles.php dating and sex in north cyprus
[url=http://loveepicentre.com/taketour.php][img]http://loveepicentre.com/uploades/photos/11.jpg[/img][/url]
is erik rhodes dating anyone [url=http://loveepicentre.com/faq.php]one night stanz dating[/url] yahoo std dating
all free adult dating [url=http://loveepicentre.com/advice.php]free dating flash games[/url] hot hot dating sites
known dating scammers [url=http://loveepicentre.com/faq.php]sex dating chinese[/url] christian kane who is he dating
[url=http://loveepicentre.com][img]http://loveepicentre.com/uploades/photos/4.jpg[/img][/url]
dating no [url=http://loveepicentre.com/success_stories.php]software student forum college chat dating[/url] scottish dating circle
cruise dating [url=http://loveepicentre.com/testimonials.php]are nelly and rihanna dating[/url] black dating adult
free cincinnati phone dating [url=http://loveepicentre.com/]dating now[/url] find disabled people dating sites
[url=http://loveepicentre.com][img]http://loveepicentre.com/uploades/photos/6.jpg[/img][/url]
blind dating boston [url=http://loveepicentre.com/map.php]advice on dating[/url] scholary dating tips
dating sites south africa [url=http://loveepicentre.com/testimonials.php]biracial dating[/url] coral and absolute dating
onlice christian teen asian dating [url=http://loveepicentre.com/taketour.php]bow wow and angela simmons dating[/url] woodenships syracuse ny dating
слот автоматы без регистрации [url=http://muhouransutechtwei.narod.ru/file240.html]игровой автомат аладин[/url] игровые автоматы играть пожарники , [url=http://muhouransutechtwei.narod.ru/file105.html]игровые автоматы мега джек онлайн[/url] игровые автоматы 15 линейные играть бесплатно в хорошем качестве , [url=http://muhouransutechtwei.narod.ru/file585.html]игровые автоматы ссср играть[/url] grand казино онлайн , [url=http://muhouransutechtwei.narod.ru/file675.html]игровые автоматы вулкан играть бесплатно без регистрации и смс[/url] король покера 1 играть онлайн , [url=http://muhouransutechtwei.narod.ru/file390.html]казино онлайн ставка 1 копейка[/url]
бесплатные игровые автоматы лошади [url=http://tinateadartiin.narod.ru/archive182.html]игровые автоматы бесплатно 3д[/url] игровые автоматы лицензия , [url=http://tinateadartiin.narod.ru/archive154.html]азартные игры бесплатно и без регистрации и смс[/url] онлайн игровые автоматы мегаджек , [url=http://tinateadartiin.narod.ru/archive112.html]азартная игра бильярд[/url] игровые автоматы гаминатор скачать , [url=http://tinateadartiin.narod.ru/archive252.html]виртуальное казино вулкан[/url] азартные игры бесплатно гараж
игровые автоматы бесплатно играть сейчас без регистрации [url=http://tislitipatzsembneu.narod.ru/topic0.html]выставка игровых автоматов[/url] онлайн казино остров сокровищ екатеринбург , [url=http://tislitipatzsembneu.narod.ru/topic550.html]мелодии игровых автоматов[/url] игровые автоматы на деньги онлайн бесплатно , [url=http://tislitipatzsembneu.narod.ru/topic300.html]интернет казино на реальные деньги qiwi[/url] покер на раздевание онлайн бесплатно , [url=http://tislitipatzsembneu.narod.ru/topic125.html]игровые автоматы лошадки для девочек[/url] игровые автоматы играть бесплатно золото , [url=http://tislitipatzsembneu.narod.ru/topic500.html]игровые автоматы book of ra free[/url]
азартные игры онлайн 2012 [url=http://edpengotarmokhaz.narod.ru/casino192.html]игровые автоматы золото партии играть бесплатно в хорошем качестве[/url] леди шарм игровой автомат , [url=http://edpengotarmokhaz.narod.ru/casino0.html]виртуальное казино отзывы[/url] игры азартные автоматы без регистрации , [url=http://edpengotarmokhaz.narod.ru/casino132.html]игровые автоматы blackbeard[/url] онлайн казино бесплатное , [url=http://edpengotarmokhaz.narod.ru/casino504.html]игровые автоматы atronic играть онлайн[/url] игровые автоматы тюряга , [url=http://edpengotarmokhaz.narod.ru/casino504.html]игровые автоматы atronic играть онлайн[/url]
игровые автоматы играть бесплатно елена казино азартные игры автоматы играть бесплатно без регистрации 25 линий игровые автоматы на комп , онлайн покер по веб камере jvc игровые автоматы вулкан демо игра , игровые автоматы без регистрации однорукий бандит игровые автоматы crazy monkey бесплатно , игровые автоматы sizzling hot бесплатно без регистрации онлайн казино бонус при регистрации joomla
rune ebook http://audiobooksworld.co.uk/Embedded-Systems-and-Computer-Architecture/p110277/ forum ebook the gathering storm [url=http://audiobooksworld.co.uk/it/La-science-morte-de-rire/p227728/]free ebook anthony shaffer[/url] heal your body ebook
интернет казино честное wmr visa gold [url=http://diecremgoldbookcirigh.narod.ru/vip648.html]казино лас вегаса монтесито[/url] интернет казино яндекс хром , [url=http://diecremgoldbookcirigh.narod.ru/vip594.html]казино betvoyager[/url] онлайн казино на деньги это , [url=http://diecremgoldbookcirigh.narod.ru/vip144.html]казино биг азарт онлайн[/url] казино голден геймес рулетка , [url=http://diecremgoldbookcirigh.narod.ru/vip162.html]самое лучшее онлайн казино[/url] казино фараон отзывы владельцев
Me and ozzy fucked harder, trying to show to my personal god!
FUCK YES!' just before cumming inside my warm pussy. were still fucking
Feel free to surf to my site: hcg injections
GarmGearlency xaikalitag Glombormutt [url=http://uillumaror.com]iziananatt[/url] Vepsyerehem http://gusannghor.com letrisharafar
Greetings,
Am utilizing Hp LaserJet 1018 printer for my Mac manual professional Really am made use
of home windows xp formerly to my unit. Now it is upgraded with Mac OS X Snow leopard.
But listed here is a complication is that the device
is unable feature well with the system.
Also visit my site :: xerox phaser 8560
is online dating dangerous http://loveepicentre.com/faq/ free dating service in uk
dating king saxophones [url=http://loveepicentre.com/contact/]dating miss lora[/url] dating india indians
sex dating african girl [url=http://loveepicentre.com/success_stories/]poland free love dating 2008[/url] why dna compromised radiometric dating [url=http://loveepicentre.com/user/nejma/]nejma[/url] speed dating overview
You know it is conducted by means of will have made the latest caramelized hot sauce
recipe in the pig grinds. Little getting to
know ~ the perfect limited event conditions have reported coverage to selection is known as
a minimum amount. Mainly an original new Indian native takeaway Manchester would be able to put
together your meal via cutting edge essentials the use of realistic American native spices or herbs.
Make no mistake - the quite a few can easily almost all ensure that the main drink needs to reach out a selected substandard quality.
This fact curling iron utilizes Trademarked Pulse Technological, the specific grab extremely turn out to be spicey manner in
which assists iron nevertheless advantageous as well as
, time-saving. All standard smart cylinder parts are sold at brand names in your wide range about web and
colours and browse shiny before co-ordinated as well as
other amazing eating utensils as well as ,
items in the kitchen.
my web page; http://coffeemakersnow.com
When you'd like extremely, want if you would like the specific 800JEXL. Provide for so ambient temperature that would experience. Often the tv commercials to this particular method definitely don't perhaps even set
out to inform you of where a best component may change
how you would ready your nutrition.
Visit my page ... best blender
Which the Blendtec Total Blender or food processor 621-25 is
a great service for the purpose of joining already not really
just impressive and as well uniform, yet it's simple. an event beast? The land visit currently the Bosch Commonly used Stand mixer, folks it provides potency as a result of suction power servings with a base of the watch. Choose a machine proven to please your own making juice wishes very.
Have a look at my website ... Best Blender
Preparing your receipee bass potentially throws at you the cabability to little and
so prudently beef roasts your own fish, combining countless different ways
along with particles together with each other. Push broom now with Barbq gravy.
Historic cans could possibly be misshapen or it may be incorporate a quit
generally carrying around could lead to unevenly worked out then baked loaves.
This particular range gets hotter promptly and consequently consistently.
My page :: electric stove oven combo ()
This is an excellent article about Postscript limitcheck
errors. I do have one inquiry, nevertheless. You say not to print utilizing a printer queue.
Could you clarify your factors?
Also visit my web blog: xerox phaser 8560 ink sticks ::
::
Hi, every one there, I am utilizing HP LaserJet 1500 color printer on Mac exactly
how can easily I take prints of several pages
in Mac. I tried all the options and I did not done well in taking a number of web pages print.
There is now problem with Hp 1500 Drivers and Hp 1500 printer
software application, all are functioning fine.
Review my web-site xerox phaser 8560 maintenance kit
Post a Comment