double a[10];
int b[10];
int i = 0;
for (i;i<10;i++)
{
b[i]=i;
}
double temp;
int tempi;
double n = 10;
for (i;i<n;i++)
{
for (int j=0;j<n-1;j++)
{
if (a[j]>a[j+1])
{
temp=a[j];
tempi=b[j];
a[j]=a[j+1];
b[j]=b[j+1];
a[j+1]=temp;
b[j+1]=tempi;
}
}
}
int k = ceil(n/2+1);
cout << "element" << a[k];
cout << "index" << b[k];