Kitab O Sunnat

Saturday, March 13, 2010

Stack2 Tc

#include
#include
int main(void)
void insurtion(int a[]);
void deletion (int []);
void updating(int []);
int a[7];
count=0;
{
clrscr();
int op;
switch(op);
{
case 1:
cout<<"Press 1 for insurtion ";
insurtion (a[]);
case 2:
cout<<"Press 2 for deltion";
deletion(a[]);
case 3:
cout<<"Press 3 for updationg";
updating(a[]);
case 4:
cout<<"Press 4 for break the function";
break;
}

getch();
}
void insurtion(int a[])
{
if(count<7)

{
a[count]==book1 ;
count++
}
void deletion(a[])
{
int i,dlete;
if(count==0)
cout<<"opration failed";

cout<<"Enter the postion for deletion ";
cin>>dlete;

for(i=0;i<7;i++)
{
if(a[i]==dlete)
{
a[i]==a[i+1]
}
}
count--
}
void updating(a[])
{
int j,temp;
for(j=0;j<7;j++)
{
if(a[j]{
temp=a[j]
a[j]=a[j+1]
a[j+1]=temp
}}
}

No comments:

NEOBUX

http://www.neobux.com/?r=taahaijaz