Array sorting in ascending order in c + +

#include<iostream.h>
#include<conio.h>
class ascending
{
private:
int a[10],i,j,temp;
public:
void input();
void sorting();
void display();
};
void ascending::input()
{
cout<<"enter number";
for(int i=1;i<=10;i++)
{
cin>>a[i];
}
}
void ascending::sorting()
{
cout<<"\n daata after soting";
for(int j=1;j<=10;j++)
{
cout<<"\t"<<a[j];
}
for(int i=1;i<=10;i++)
{
for(int j=1;j<=10-i;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}}
void ascending::display()
{
cout<<"\n data after sorting";
for(int j=1;j<=10;j++)
{
cout<<"\t"<<a[j];
 }
}
int main()
{
ascending s;
clrscr();
s.input();
s.sorting();
s.display();
getch();
return 0;
}

Comments