good picture, you always have a brilliant idea to develop the progress to success, thank you friend, hope you are also happy, greeting from Indonesian bloggers.
class circularqueue { int a[50], front, rear,n; public: circularqueue() { cout<<"Enter the number of elements to create an array with\n"; cin>>n; front=-1; rear=-1; clrscr(); } void geta() { cout<<"Enter the element to be inserted\n"; int c; cin>>c; if((rear==front-1)||((rear==n-1)&&(front==0))) { cout<<"Element cannot be inserted as the queue is full\n"; getch(); } else if(front==-1) { front=rear=0; a[rear]=c; cout<<"Queue was empty and element was inserted\n"; getch(); } else if(rear==n-1) { rear=0; a[rear]=c; cout<<"Rear was at the end. It was moved to zero and element was inserted\n"; getch(); } else { rear++; a[rear]=c; cout<<"Rear was incremented and then element was inserted\n"; getch(); } } void dele() { if(front==-1) { cout<<"Queue is empty. Delete operation cannot be performed.\n"; getch(); } else if((front==rear-1)||((front==n-1)&&(rear==0))) { rear=front=-1; cout<<"Queue was completely emptied\n"; getch(); } else if(front==n-1) { front=0; cout<<"Front was at the end of the array and it was moved to 0\n"; getch(); } else { front++; cout<<"Front was incremented\n"; getch(); } } void disp() { int i=front; if(front==-1) { cout<<"No elements to display\n"; getch(); } else if(rearrear) { cout<<"Front is greater than rear. Displaying elements from front till end and then from beginning till rear.\n"; while(i>h; switch(h) { case 1:cq.geta(); break; case 2:cq.dele(); break; case 3:cq.disp(); break; default:exit(0); } }while(1); }
class circularqueue { int a[50], front, rear,n; public: circularqueue() { cout<<"Enter the number of elements to create an array with\n"; cin>>n; front=-1; rear=-1; clrscr(); } void geta() { cout<<"Enter the element to be inserted\n"; int c; cin>>c; if((rear==front-1)||((rear==n-1)&&(front==0))) { cout<<"Element cannot be inserted as the queue is full\n"; getch(); } else if(front==-1) { front=rear=0; a[rear]=c; cout<<"Queue was empty and element was inserted\n"; getch(); } else if(rear==n-1) { rear=0; a[rear]=c; cout<<"Rear was at the end. It was moved to zero and element was inserted\n"; getch(); } else { rear++; a[rear]=c; cout<<"Rear was incremented and then element was inserted\n"; getch(); } } void dele() { if(front==-1) { cout<<"Queue is empty. Delete operation cannot be performed.\n"; getch(); } else if((front==rear-1)||((front==n-1)&&(rear==0))) { rear=front=-1; cout<<"Queue was completely emptied\n"; getch(); } else if(front==n-1) { front=0; cout<<"Front was at the end of the array and it was moved to 0\n"; getch(); } else { front++; cout<<"Front was incremented\n"; getch(); } } void disp() { int i=front; if(front==-1) { cout<<"No elements to display\n"; getch(); } else if(rearrear) { cout<<"Front is greater than rear. Displaying elements from front till end and then from beginning till rear.\n"; while(i>h; switch(h) { case 1:cq.geta(); break; case 2:cq.dele(); break; case 3:cq.disp(); break; default:exit(0); } }while(1); }
ദിക്ഷിത്ത് റ്റിറ്റി ജോര്ജ്ജ്,Dikshith Titty George,Muscat,
അസൈബ,Oman.I study in Indian School Al Ghubra, in 8th class.Son of Biju and Sapna George
(www.sapnaanu.blogspot.com), the blogger identity of my 'amma' will be more clear,as i had to literally fall on her feet to make a blog like this,though she still monitors all my correspondence and actions throgh these blogs.I love scribling with pencils and started paintings too at young age, infact my preschool teacher "Anandi Shiva"initiated and inspired the painter in me.i am a left hander.
ഞാന് ഒമാനിലെ അല് ഗുബ്ര സ്കൂളില് പഠിക്കുന്ന ഒരു 7th ക്ലാസ്സ് വിദ്ധ്യാര്ഥിയാണ്.ബിജുവിന്റെയും സപ്നയുടെയും രണ്ടാമത്തെ മകന് ... ചിത്രം വര്ക്കുന്നത് എനിക്ക് വലിയ ഇഷ്ടമാണ്.പിന്നെ എന്റെ ഇടത്തുകൈ,.അമ്മയുണ്ടോ വിടുന്നു!!!!അടി,പിച്ച്,തല്ല്. തൊമ്മനേ....ആ നീട്ടിയ വിളികേട്ടു കേട്ടു ഞാന് മലയാളം പഠിച്ചു. എങ്കിലും എന്റെ ഏറ്റവും വലിയ ഹോബി പടം വരക്കുന്നതാണ്.പിന്നെ cartoon,അതും അവധിക്കുമാത്രം. പാട്ടുകള് അതു വളരെ ഇഷ്ടം ആണ്... അതും അമ്മ തല്ലി പാടിപ്പിച്ചതാണ്. ഇന്ന് എന്റെ കയ്യില് കുറെ cassets,CD യും ഉണ്ട്,എന്റെ സ്വന്തമായി.
mon,u r very creative-keep doing
ReplyDeletebest wishes
good picture, you always have a brilliant idea to develop the progress to success, thank you friend, hope you are also happy, greeting from Indonesian bloggers.
ReplyDeleteVery creative, thanks friend, fraternal greetings and best friend visited the house.
ReplyDeleteThanks Dear Dunia Berkarya...............its my son, but thanks for the good words
ReplyDeleteNice creations Dikshith.
ReplyDeleteGo ahead and try to improve your creativity
day by day. Best Wishes.
Beautiful paintings.
ReplyDeleteThanks Mathew Naval
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehai thomman.
ReplyDeletevarakale koottu pidikkukka, ethra rasakaramanu.very creative. keep it up.
//Circular queue
ReplyDelete#include
#include
#include
#include
class circularqueue
{
int a[50], front, rear,n;
public:
circularqueue()
{
cout<<"Enter the number of elements to create an array with\n";
cin>>n;
front=-1;
rear=-1;
clrscr();
}
void geta()
{
cout<<"Enter the element to be inserted\n";
int c;
cin>>c;
if((rear==front-1)||((rear==n-1)&&(front==0)))
{
cout<<"Element cannot be inserted as the queue is full\n";
getch();
}
else if(front==-1)
{
front=rear=0;
a[rear]=c;
cout<<"Queue was empty and element was inserted\n";
getch();
}
else if(rear==n-1)
{
rear=0;
a[rear]=c;
cout<<"Rear was at the end. It was moved to zero and element was inserted\n";
getch();
}
else
{
rear++;
a[rear]=c;
cout<<"Rear was incremented and then element was inserted\n";
getch();
}
}
void dele()
{
if(front==-1)
{
cout<<"Queue is empty. Delete operation cannot be performed.\n";
getch();
}
else if((front==rear-1)||((front==n-1)&&(rear==0)))
{
rear=front=-1;
cout<<"Queue was completely emptied\n";
getch();
}
else if(front==n-1)
{
front=0;
cout<<"Front was at the end of the array and it was moved to 0\n";
getch();
}
else
{
front++;
cout<<"Front was incremented\n";
getch();
}
}
void disp()
{ int i=front;
if(front==-1)
{
cout<<"No elements to display\n";
getch();
}
else if(rearrear)
{
cout<<"Front is greater than rear. Displaying elements from front till end and then from beginning till rear.\n";
while(i>h;
switch(h)
{
case 1:cq.geta(); break;
case 2:cq.dele(); break;
case 3:cq.disp(); break;
default:exit(0);
}
}while(1);
}
//Circular queue
ReplyDelete#include
#include
#include
#include
class circularqueue
{
int a[50], front, rear,n;
public:
circularqueue()
{
cout<<"Enter the number of elements to create an array with\n";
cin>>n;
front=-1;
rear=-1;
clrscr();
}
void geta()
{
cout<<"Enter the element to be inserted\n";
int c;
cin>>c;
if((rear==front-1)||((rear==n-1)&&(front==0)))
{
cout<<"Element cannot be inserted as the queue is full\n";
getch();
}
else if(front==-1)
{
front=rear=0;
a[rear]=c;
cout<<"Queue was empty and element was inserted\n";
getch();
}
else if(rear==n-1)
{
rear=0;
a[rear]=c;
cout<<"Rear was at the end. It was moved to zero and element was inserted\n";
getch();
}
else
{
rear++;
a[rear]=c;
cout<<"Rear was incremented and then element was inserted\n";
getch();
}
}
void dele()
{
if(front==-1)
{
cout<<"Queue is empty. Delete operation cannot be performed.\n";
getch();
}
else if((front==rear-1)||((front==n-1)&&(rear==0)))
{
rear=front=-1;
cout<<"Queue was completely emptied\n";
getch();
}
else if(front==n-1)
{
front=0;
cout<<"Front was at the end of the array and it was moved to 0\n";
getch();
}
else
{
front++;
cout<<"Front was incremented\n";
getch();
}
}
void disp()
{ int i=front;
if(front==-1)
{
cout<<"No elements to display\n";
getch();
}
else if(rearrear)
{
cout<<"Front is greater than rear. Displaying elements from front till end and then from beginning till rear.\n";
while(i>h;
switch(h)
{
case 1:cq.geta(); break;
case 2:cq.dele(); break;
case 3:cq.disp(); break;
default:exit(0);
}
}while(1);
}