#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdio.h>
#include<process.h>
class Project
	{// body of class start
	private:
	public:
void page_border()
	{// body of page border start
	setcolor(WHITE);
	rectangle(620,460,20,20);
	rectangle(625,465,25,25);
	}// body of page border close
void previous_menu()
	{// body of function previous menu start
	while(!kbhit())
	{// body of kbhit start
	setcolor(9);
	outtextxy(160,420, "Press Any Key To Goto Previous Menu");
	delay(500);
	setcolor(BLACK);
	outtextxy(160,420, "Press Any Key To Goto Previous Menu");
	delay(500);
	}// body of kbhit close
	}// body of fucntion previous menu close
void welcome()
	{// body of welcome function start
	clrscr();
	int x;
	settextstyle(4,0,7);
	setcolor(13);
	for(int move=30;move<=100;move++)
		{// body of for loop start
		cleardevice();
		outtextxy(50,move,"Welcome To Project");
		delay(50);
		}// body of for loop close
	page_border();
	for(int m=263;m<358;m++)
		{// body of for loop stat
		setcolor(9);
		delay(5);
		rectangle(263,340,m,305);
		}// body of for loop close
	setcolor(13);
	settextstyle(7,0,4);
	outtextxy(265,300,"Enter");
	while(!kbhit())
	{// body of while kbhit start
	settextstyle(4,0,7);
	setcolor(3);
	outtextxy(50,100,"Welcome To Project");
	delay(300);
	setcolor(11);
	outtextxy(50,100,"Welcome To Project");
	delay(300);
	setcolor(12);
	outtextxy(50,100,"Welcome To Project");
	delay(300);
	setcolor(13);
	outtextxy(50,100,"Welcome To Project");
	delay(300);
	}// body of while kbhit close
	getch();
	settextstyle(7,0,4);
	outtextxy(250,350,"Loading . . .");
	for(int j=50;j<590;j++)
		{// body of for loop stat
		setcolor(9);
		rectangle(50,400,j,415);
		delay(6);
		}// body of for loop close
	}// body of welcome function close
void introduction()
		{// body of introduction funtion start
		clrscr();
		int gd=DETECT,gm;
		initgraph(&gd,&gm,"../bgi");
		page_border();
		settextstyle(4,0,7);
		setcolor(13);
		outtextxy(125,30,"Data Structure");
		setcolor(13);
		settextstyle(4,0,4);
		outtextxy(50,160,"By: Muhammad Arslan Sajid");
		outtextxy(50,200, "Roll #: 1431");
		outtextxy(50,240, "Class: BS-IT");
		outtextxy(50,280, "Semester: 3rd");
		outtextxy(50,320, "Department: Computer Science");
		outtextxy(50,360, "University: GC, Faisalabad");
		for(int i=480;i<575;i++)
			{// body of for loop stat
			setcolor(9);
			delay(10);
			rectangle(480,440,i,405);
			}// body of for loop close
		while(!kbhit())
		{// body of kbhit start
		setcolor(13);
		settextstyle(7,0,4);
		outtextxy(480,403,"Enter");
		delay(500);
		setcolor(14);
		outtextxy(480,403,"Enter");
		delay(500);
		}// body of kbhit close
		}// body of introduction function close
void data_structure()
	{// body of data structure start
	cleardevice();
	int option,option1;
	page_border();
	settextstyle(4,0,7);
	setcolor(13);
	outtextxy(125,30,"Data Structures");
	setcolor(13);
	settextstyle(4,0,4);
	outtextxy(50,160,"1- Arrays");
	outtextxy(50,200, "2- Stacks");
	outtextxy(50,240, "3- Queues");
	settextstyle(1,0,2);
	outtextxy(200,345, "Enter Your Choice");
	}// body of data structure close
void coding(int option)
	{// body of coding start
	data:
	cleardevice();
	int option1,option2;
	char y;
	switch(option)
		{// body of switch option start
		case 1:
		{// body of case  when option is 1 start
		page_border();
		setcolor(13);
		settextstyle(4,0,7);
		outtextxy(70,30,"Welcome To Array");
		setcolor(13);
		settextstyle(4,0,4);
		outtextxy(50,160,"1- Simple Array");
		outtextxy(50,200, "2- Multidimension Array");
		settextstyle(1,0,2);
		outtextxy(200,345, "Enter Your Choice");
		gotoxy(52,23);
		cin>>option1;
		switch(option1)
			{// body of switch option1 IF start
			case 1:
			{// body of case when option1 is 1 start
			simple_array:
			cleardevice();
			page_border();
			setcolor(13);
			settextstyle(4,0,7);
			outtextxy(130,30,"Simple Array");
			settextstyle(4,0,2);
			outtextxy(50,130,"1- Traversing");
			outtextxy(50,170, "2- Insertion");
			outtextxy(50,210, "3- Deletion");
			outtextxy(50,250, "4- Bubble Sort");
			outtextxy(50,290, "5- Simple Search");
			outtextxy(50,330, "6- Binary Search");
			outtextxy(50,370, "7- Goto Previous Menue");
			settextstyle(1,0,2);
			outtextxy(200,408, "Enter Your Choice");
			gotoxy(52,27);
			cin>>option2;
			if(option2==1)
				{// body of IF option2 when choice is "1" Start
				cleardevice();
				int LA[5];
				int LB=0,l,a=13,b=32,c=280;
				page_border();
				setcolor(13);
				settextstyle(4,0,7);
				outtextxy(180,30,"Traversing");
				settextstyle(1,0,1);
				outtextxy(35,122,"Enter Length Of Array : ");
				gotoxy(34,9);
				cin>>l;
				for(int i=0;i<l;i++)
					{// body of for loop start
					gotoxy(5,a);
					cout<<"Enter "<<i+1<<" Element Of Array: ";
					cin>>LA[i];
					a=a+1;
					}// body of for loop close
				outtextxy(43,310,"After Traversing");
	for(int aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(245,365,c,385);
		c=c+35;
		}// body of for loop close
for(int K=LB;K<l;K++)
	{// body of for loop start
	gotoxy(b,24);
	cout<<LA[K]*2;
	b=b+5;
	}// body of for oop close
	previous_menu();
	cleardevice();
	page_border();
	settextstyle(4,0,5);
	setcolor(13);
	outtextxy(60,190, "Thanks For Using Traversing");
	outtextxy(350,325, "Bye Bye . . .");
	for(int q=50;q<600;q++)
		{// body of for loop stat
		setcolor(9);
		delay(5);
		rectangle(50,400,q,415);
		}// body of for loop close
	goto simple_array;
				}// body of IF option2 when choice is "1" close
		if(option2==2)
			{// body of IF option2 when choice is "2" start
			cleardevice();
			int a=8,b=13,c=27,d=235,l,num,index;
			page_border();
			setcolor(13);
			settextstyle(4,0,7);
			outtextxy(190,30,"Insertion");
			settextstyle(1,0,1);
			outtextxy(150,115,"Initialization Of Array Start . . .");
			outtextxy(35,137,"Enter Length Of Array : ");
			gotoxy(34,10);
			cin>>l;
			int arr[10];
			for(int i=0;i<l;i++)
					{// body of for loop start
					gotoxy(5,b);
					cout<<"Enter "<<i+1<<" Element Of Array: ";
					cin>>arr[i];
					b=b+1;
					}// body of for loop close
			setcolor(13);
			outtextxy(33,393,"Before Insertion Number Of Elements In Array Are : ");
			gotoxy(67,26);
			cout<<l;
			while(!kbhit())
			{// body of kbhit start
			setcolor(9);
			outtextxy(160,420, "Press Any Key To Goto Next Page");
			delay(500);
			setcolor(BLACK);
			outtextxy(160,420, "Press Any Key To Goto Next Page");
			delay(500);
			}// body of kbhit close
			label:
			cleardevice();
			page_border();
			setcolor(13);
			outtextxy(33,30,"Before Desire Insertion Elements Of Array Are...");
	for(int aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(200,125,d,145);
		d=d+35;
		}// body of for loop close
			for(int j=0;j<l;j++)
				{// body of for loop start
				gotoxy(c,9);
				cout<<arr[j];
				c=c+5;
				}// body of for loop closed
			outtextxy(33,201,"Enter The Element You Want To Insert : ");
			gotoxy(53,14);
			cin>>num;
			outtextxy(33,234,"Enter The Index Where You Want To Insert : ");
			gotoxy(58,16);
			cin>>index;
			for(int k=l;k>=index;k--)
				{// body of for loop start
				arr[k+1]=arr[k];
				}// body of for loop close
			arr[index]=num;
			l=l++;
			cleardevice();
			int e=235,f=27;
			page_border();
			setcolor(13);
			outtextxy(33,41,"After Insertion Number Of Elements In Array Are : ");
			gotoxy(66,4);
			cout<<l;
			outtextxy(33,70,"After Insertion Elements Of Array Are...");
for(aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(200,125,e,145);
		e=e+35;
		}// body of for loop close
			for(int m=0;m<l;m++)
				{// body of for loop start
				gotoxy(f,9);
				cout<<arr[m];
				f=f+5;
				}// body of for loop close
			wrong:
			outtextxy(33,300, "If You Want To Insert More Element Press 'Y' If Not Press 'N' ");
			gotoxy(77,20);
			cin>>y;
			if(y=='Y'||y=='y')
				{// body of IF y choice start
				d=235,a=8,b=13,c=27,e=235,f=27;
				goto label;
				}// body of IF y choice close
			else if(y=='N'||y=='n')
				{// body of ELSE IF n choice start
				cleardevice();
				page_border();
				settextstyle(4,0,5);
				setcolor(13);
				outtextxy(60,190, "Thanks For Using Insertion");
				outtextxy(350,325, "Bye Bye . . .");
				}// body of ELSE IF n choice close
				else
					{// body of ELSE start
					goto wrong;
					}// body of ELSE close
			for(int q=50;q<600;q++)
				{// body of for loop stat
				setcolor(9);
				delay(5);
				rectangle(50,400,q,415);
				}// body of for loop close
			goto simple_array;
			}//body of IF option2 when choice is '2 close
			if(option2==3)
				{// body of IF option2 when choice is '3' start
				cleardevice();
				int l,b=13,c=27,d=235,num,index;
				char y;
				page_border();
				settextstyle(4,0,7);
				setcolor(13);
				outtextxy(200,30, "Deletion");
				settextstyle(1,0,1);
				outtextxy(35,137,"Enter Length Of Array : ");
				gotoxy(34,10);
				cin>>l;
				int arr[10];
				for(int i=0;i<l;i++)
					{// body of for loop start
					gotoxy(5,b);
					cout<<"Enter "<<i+1<<" Element Of Array: ";
					cin>>arr[i];
					b=b+1;
					}// body of for loop close
				outtextxy(33,393,"Before Deletion Number Of Elements In Array Are : ");
				gotoxy(66,26);
				cout<<l;
				while(!kbhit())
					{// body of kbhit start
					setcolor(9);
					outtextxy(160,420, "Press Any Key To Goto Next Page");
					delay(500);
					setcolor(BLACK);
					outtextxy(160,420, "Press Any Key To Goto Next Page");
					delay(500);
					}// body of kbhit close
				label1:
				cleardevice();
				page_border();
				setcolor(13);
				outtextxy(33,30,"Before Deletion Elements Of Array Are...");
for(int aa=0;aa<l;aa++)
	{// body of for loop start
	rectangle(200,125,d,145);
	d=d+35;
	}// body of for loop close
		for(int j=0;j<l;j++)
			{// body of for loop start
			gotoxy(c,9);
			cout<<arr[j];
			c=c+5;
			}// body of for loop close
				outtextxy(33,201,"Enter The Index Number Of Element You Want To Delete : ");
				gotoxy(74,14);
				cin>>index;
				arr[index]=num;
				for(int k=index;k<l;k++)
					{// body of for loop start
					arr[k]=arr[k+1];
					}// body of for loop close
				l=l--;
				cleardevice();
				int e=235,f=27;
				page_border();
				setcolor(13);
				outtextxy(33,41,"After Deletion Number Of Elements In Array Are : ");
				gotoxy(66,4);
				cout<<l;
				outtextxy(33,70,"After Deletion Elements Of Array Are...");
for(aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(200,125,e,145);
		e=e+35;
		}// body of for loop close
		 for(int m=0;m<l;m++)
			{// body of for loop start
			gotoxy(f,9);
			cout<<arr[m];
			f=f+5;
			}// body of for loop close
				wrong1:
				outtextxy(33,300, "If You Want To Delete More Element Press 'Y' If Not Press 'N' ");
				gotoxy(77,20);
				cin>>y;
				if(y=='Y'||y=='y')
					{// body of IF y choice start
					d=235,b=13,c=27,e=235,f=27;
					goto label1;
					}// body of IF y choice close
				else if(y=='N'||y=='n')
						{// body of ELSE IF n choice start
						cleardevice();
						page_border();
						settextstyle(4,0,5);
						setcolor(13);
						outtextxy(60,190, "Thanks For Using Deletion");
						outtextxy(350,325, "Bye Bye . . .");
						}// body of ELSE IF n choice close
				else
					{// body of ELSE start
					goto wrong1;
					}// body of ELSE close
			for(int q=50;q<600;q++)
				{// body of for loop stat
				setcolor(9);
				delay(5);
				rectangle(50,400,q,415);
				}// body of for loop close
			goto simple_array;
				}// body of IF option2 when choice is '3' close
if(option2==4)
	{// body of IF option2 when choice is '4' start
	cleardevice();
	int l,b=13,arr[10],temp,e=32,c=280;
	page_border();
	settextstyle(4,0,7);
	setcolor(13);
	outtextxy(140,30, "Bubble Sort");
	settextstyle(1,0,1);
	outtextxy(35,137,"Enter Length Of Array : ");
	gotoxy(34,10);
	cin>>l;
	for(int i=0;i<l;i++)
		{// body of for loop starts
		gotoxy(5,b);
		cout<<"Enter "<<i+1<<" Element Of Array: ";
		cin>>arr[i];
		b=b+1;
		}// body of for loop close
		for(int j=1;j<l;j++)
			{// body of outer for loop start
			for(int k=0;k<l-j;k++)
				{// body of inner for loop start
				if(arr[k]>arr[k+1])
					{// body of IF condition start
					temp=arr[k];
					arr[k]=arr[k+1];
					arr[k+1]=temp;
					}// body of IF condition close
				}// body of inner for loop close
			}// body of outer for loop close
	outtextxy(43,310,"After Bubble Sorting");
	for(int aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(245,365,c,385);
		c=c+35;
		}// body of for loop close
for(int K=0;K<l;K++)
	{// body of for loop start
	gotoxy(e,24);
	cout<<arr[K];
	e=e+5;
	}// body of for oop close
	previous_menu();
	cleardevice();
	page_border();
	settextstyle(4,0,5);
	setcolor(13);
	outtextxy(40,190, "Thanks For Using Bubble Sort");
	outtextxy(350,325, "Bye Bye . . .");
	for(int q=50;q<600;q++)
		{// body of for loop stat
		setcolor(9);
		delay(5);
		rectangle(50,400,q,415);
		}// body of for loop close
	goto simple_array;
	}// body of IF option2 when choice is '4' close
if(option2==5)
	{// body of IF option2 when choice is '5' start
	cleardevice();
	int l,b=13,arr[10],num,store[10],z=0,e=49,c=280,counter=0;
	page_border();
	settextstyle(4,0,7);
	setcolor(13);
	outtextxy(140,30, "Simple Search");
	settextstyle(1,0,1);
	outtextxy(35,137,"Enter Length Of Array : ");
	gotoxy(34,10);
	cin>>l;
	for(int i=0;i<l;i++)
		{// body of for loop start
		gotoxy(5,b);
		cout<<"Enter "<<i+1<<" Element Of Array: ";
		cin>>arr[i];
		b=b+1;
		}// body of for loop close
	outtextxy(35,346, "Enter The Number You Want To Search : ");
	gotoxy(54,23);
	cin>>num;
	for(int m=0;m<l;m++)
		{// body of FOR loop start
		if(arr[m]==num)
			{// body of IF condition start
			store[z]=m;
			z++;
			counter=counter+1;
			}// body of IF condition close
		}// body of FOR loop close
	       if(counter==0)
			{// body of IF condition start
			setcolor(3);
			outtextxy(170,370, "Unsuccessful, Number Not Found");
			previous_menu();
			}// body of IF condition close
	       else
			{// body of ELSE condition start
		       outtextxy(150,376, "Success ");
		       gotoxy(29,25);
		       cout<<counter<<" times";
		       outtextxy(296,376, "At Index");
		       for(int d=0;d<counter;d++)
				{// body of FOR loop start
				gotoxy(e,25);
				e=e+2;
				cout<<store[d];
				cout<<",";
				}// body of FOR loop close
		       }// body of ELSE condition close
	previous_menu();
	cleardevice();
	page_border();
	settextstyle(4,0,5);
	setcolor(13);
	outtextxy(40,190, "Thanks 4 Using Simple Search");
	outtextxy(350,325, "Bye Bye . . .");
	for(int q=50;q<600;q++)
		{// body of for loop stat
		setcolor(9);
		delay(5);
		rectangle(50,400,q,415);
		}// body of for loop closed
	goto simple_array;
	}// body of IF option2 when choice is '5' close
if(option2==6)
	{// body of IF option2 when choice is '6' start
	cleardevice();
	int b=13,arr[10],l,c=300,temp,q=35,LB=0,UB,start,mid,end,item;
	page_border();
	setcolor(13);
	settextstyle(4,0,7);
	outtextxy(130,40,"Binary Search");
	settextstyle(1,0,1);
	outtextxy(35,137,"Enter Length Of Array : ");
	gotoxy(34,10);
	cin>>l;
	for(int i=0;i<l;i++)
		{// body of for loop start
		gotoxy(5,b);
		cout<<"Enter "<<i+1<<" Element Of Array: ";
		cin>>arr[i];
		b=b+1;
		}// body of for loop close
		for(int j=1;j<l;j++)
			{// body of outer FOR loop start
			for(int k=0;k<l-j;k++)
				{// body of inner FOR loop start
				if(arr[k]>arr[k+1])
					{// body of IF condition start
					temp=arr[k];
					arr[k]=arr[k+1];
					arr[k+1]=temp;
					}// body of IF condition close
				}// body of inner FOR loop close
			}// body of outer FOR loop close
	outtextxy(35,310,"After Sorting Array Is :");
	for(int aa=0;aa<l;aa++)
		{// body of for loop start
		rectangle(265,316,c,336);
		c=c+35;
		}// body of for loop close
		for(int K=LB;K<l;K++)
			{// body of for loop start
			gotoxy(q,21);
			cout<<arr[K];
			q=q+5;
			}// body of for oop close
	UB=l-1;
	start=LB;
	end=UB;
	mid=(start+end)/2;
	outtextxy(35,346,"Enter The Number You Want To Search : ");
	gotoxy(54,23);
	cin>>item;
	for(start=LB;((start<=end)&&(arr[mid]!=item));start++)
		{// body of FOR loop start
			if(arr[mid]<item)
				{// body of IF condition start
				start=mid+1;
				}// body of IF condition close
			else
				{// body of IF condition start
				end=mid-1;
				}// body of IF condition close
			mid=(start+end)/2;
		}// body of FOR loop close
		if(arr[mid]==item)
			{// body of IF condition start
			outtextxy(220,376, "Success At ");
			gotoxy(41,25);
			cout<<" Index ";
			cout<<mid;
			}// body of IF condition close
		else
			{// body of ELSE condition start
			outtextxy(160,376,"Sorry, Your Entered Element Not Found");
			}// body of ELSE condition close
	previous_menu();
	cleardevice();
	page_border();
	settextstyle(4,0,5);
	setcolor(13);
	outtextxy(40,190, "Thanks 4 Using Binary Search");
	outtextxy(350,325, "Bye Bye . . .");
	for(int w=50;w<600;w++)
		{// body of for loop stats
		setcolor(9);
		delay(5);
		rectangle(50,400,w,415);
		}// body of for loop closed
	goto simple_array;
	getch();
	}// body of IF option2 when choice is '6' close
if(option2==7)
	{// body of IF option2 when choice is '7' start
	for(int w=50;w<600;w++)
		{// body of for loop stat
		setcolor(9);
		delay(5);
		rectangle(50,436,w,454);
		}// body of for loop close
	goto data;
	}// body of IF option2 when choice is '7' close
	break;
			}// body of case when option1 is 1 close
	case 2:
		{// body of case when option1 is 2 start
		cleardevice();
		page_border();
		setcolor(13);
		settextstyle(4,0,7);
		outtextxy(30,40,"Multidimension Array");
		getch();
		break;
		}// body of case when option1 is 2 close
					}// body of switch option1 close
		break;
		}// body of case when option is '1' close
				case 2:
			{// body of case when option is 2 start
			stack:
			cleardevice();
			int choice;
			page_border();
			setcolor(13);
			settextstyle(4,0,7);
			outtextxy(70,30,"Welcome To Stack");
			settextstyle(4,0,2);
			outtextxy(50,130,"1- Push (Insertion)");
			outtextxy(50,170, "2- Pop (Deletion)");
			outtextxy(50,210, "3- Searchig");
			outtextxy(50,250, "4- Polish (Infix To Postfix Expression)");
			outtextxy(50,290, "5- Evaluation Of Postfix");
			outtextxy(50,330, "6- Quick Sort");
			outtextxy(50,370, "7- Goto Previous Menue");
			settextstyle(1,0,2);
			outtextxy(200,408, "Enter Your Choice");
			gotoxy(52,27);
			cin>>choice;
			if(choice==1)
				{// body of IF when choice is '1' start
				cleardevice();
				int l,stack[10],b=13,c=13,d=180,num,top,e=405,f=27;
				page_border();
				setcolor(13);
				settextstyle(4,0,7);
				outtextxy(80,30, "Welcome To Push");
				settextstyle(1,0,1);
				outtextxy(35,137,"Enter Length Of Stack : ");
				gotoxy(34,10);
				cin>>l;
				for(int i=0;i<l;i++)
					{// body of for loop start
					gotoxy(5,b);
					cout<<"Enter "<<i+1<<" Element Of Stack: ";
					cin>>stack[i];
					b=b+1;
					top=i;
					}// body of for loop close
				setcolor(13);
				outtextxy(33,393,"Before Pushing Number Of Elements In Stack Are : ");
				gotoxy(67,26);
				cout<<l;
				previous_menu();
				cleardevice();
				page_border();
				setcolor(13);
				outtextxy(33,30,"Before Pushing Elements Of Stack Are...");
				for(int aa=0;aa<l;aa++)
					{// body of for loop start
					rectangle(450,210,470,d);
					d=d-30;
					}// body of for loop close
					for(int j=0;j<l;j++)
						{// body of for loop start
						gotoxy(58,c);
						cout<<stack[j];
						c=c-2;
						}// body of for loop closed
				outtextxy(33,201,"Enter The Element You Want To Push : ");
				gotoxy(51,14);
				cin>>num;
				l=l+1;
				top=top+1;
				stack[top]=num;
				outtextxy(33,234,"After Pushing Elements In Stack Are. . . ");
				for(int bb=0;bb<l;bb++)
					{// body of for loop start
					rectangle(497,435,517,e);
					e=e-30;
					}// body of for loop close
					for(j=0;j<l;j++)
						{// body of for loop start
						gotoxy(64,f);
						cout<<stack[j];
						f=f-2;
						}// body of for loop closed
				previous_menu();
				cleardevice();
				page_border();
				settextstyle(4,0,5);
				setcolor(13);
				outtextxy(40,190, "Thanks 4 Using Pushing");
				outtextxy(350,325, "Bye Bye . . .");
				for(int w=50;w<600;w++)
					{// body of for loop stats
					setcolor(9);
					delay(5);
					rectangle(50,400,w,415);
					}// body of for loop closed
				goto stack;
				}// body of IF when choice is '1' close
			if(choice==2)
				{// body of IF when choice is '2' start
				cleardevice();
				page_border();
				cleardevice();
				int l,stack[10],b=13,c=13,d=180,index,top,e=405,f=27;
				page_border();
				setcolor(13);
				settextstyle(4,0,7);
				outtextxy(80,30, "Welcome To Pop");
				settextstyle(1,0,1);
				outtextxy(35,137,"Enter Length Of Stack : ");
				gotoxy(34,10);
				cin>>l;
				for(int i=0;i<l;i++)
					{// body of for loop start
					gotoxy(5,b);
					cout<<"Enter "<<i+1<<" Element Of Stack: ";
					cin>>stack[i];
					b=b+1;
					top=i;
					}// body of for loop close
				setcolor(13);
				outtextxy(33,393,"Before Poping Number Of Elements In Stack Are : ");
				gotoxy(67,26);
				cout<<l;
				previous_menu();
				cleardevice();
				page_border();
				setcolor(13);
				outtextxy(33,30,"Before Poping Elements Of Stack Are...");
				for(int aa=0;aa<l;aa++)
					{// body of for loop start
					rectangle(450,210,470,d);
					d=d-30;
					}// body of for loop close
					for(int j=0;j<l;j++)
						{// body of for loop start
						gotoxy(58,c);
						cout<<stack[j];
						c=c-2;
						}// body of for loop closed
				outtextxy(33,201,"Enter The Element You Want To Pop : ");
				gotoxy(51,14);
				cin>>index;
				top=index-1;
				l=top+1;
				}// body of IF when choice is '2' close
			getch();
			break;
			}// body of case when option is 2 close
		}// body of switch option close
	}//body of coding closed
void end()
	{//body of end function start
	cleardevice();
	page_border();
	settextstyle(4,0,7);
	setcolor(13);
	outtextxy(50,80,"Ending Of Project");
	 setcolor(13);
	settextstyle(7,0,4);
	outtextxy(230,300,"Please Wait . . .");
	for(int j=50;j<600;j++)
		{// body of for loop stat
		setcolor(9);
		delay(10);
		rectangle(50,400,j,415);
		}// body of for loop close
	exit(0);
	}//body of end function close
	};// body of clss close
void main()
	{// body of main start
	clrscr();
	int gd=DETECT,gm;
	initgraph(&gd,&gm,"../bgi");
	Project p;
	int option;
//	p.welcome();
//	p.introduction();
	p.data_structure();
	gotoxy(52,23);
	cin>>option;
	p.coding(option);
//	p.end();
	getch();
	}// body of main close



