#include
using namespace std;
class earray-search
{
public:
int elmt=0,x[20],inp,i;
earray();
~earray();
void proved();
};
earray::earray()
{
cout<<"the elements:"<>x[i];
}
earray::~earray()
{
cout<<"destructing"<>inp;
for(i=0;i<20;i++)
{
if(x[i]==inp)
{
cout<<"found"<<endl;
elmt=1;
break;
}
}
if(elmt==0)
cout<<"Not found"<<endl;
}
int main()
{
search-earray sa;
sa.proved();
}
using namespace std;
class earray-search
{
public:
int elmt=0,x[20],inp,i;
earray();
~earray();
void proved();
};
earray::earray()
{
cout<<"the elements:"<>x[i];
}
earray::~earray()
{
cout<<"destructing"<>inp;
for(i=0;i<20;i++)
{
if(x[i]==inp)
{
cout<<"found"<<endl;
elmt=1;
break;
}
}
if(elmt==0)
cout<<"Not found"<<endl;
}
int main()
{
search-earray sa;
sa.proved();
}
No comments:
Post a Comment