0

hi plz help me

i am getting the above error

here i am attaching the program

```
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
int a[10],t,n,pos;
clrscr();
//Sorting the elements in the array. Sorting technique name is “Bubble Sort”
cout<<"Enter Elements into the Array";
for(int i=0;i<10;i++)
cin>>a;
for( i=0;i<10;i++)
{
for(int j=i+1;j<10;j++)
{
if(a>a[j]) //Elements are sorted in ascending order
{
t = a;
a=a[j];
a[j]=t;
}
}
}
//Till here all the elements are sorted. Now the binary search starts.
cout<<"Enter the element you want to search";
cin>>n;
pos=binarysearch(a[10],0,9,n);
if(pos < 0)
cout<<"Element not Found";
else
cout<<"Element found at Position"<<pos;
getch();
}
//Function Starts
int binarysearch(int x[10],int start,int end,int n)
{
while (start<end)
{
int mid = (start+end)/2;
if(n>x[mid])
start = mid+1;
else if(n<x[mid])
end = mid-1;
else
return mid;
}
return -1;
}
```

*Edited 3 Years Ago by happygeek*: fixed formatting