#include<iostream.
h>
#include<conio.h>
class sort
{
public:
int a[100];
int i,j,n,tmp;
void getdata();
void process();
void display();
};
void sort::getdata()
{
cout<<"Enter the Sort Number:";
cin>>n;
cout<<"Enter the Numbers:"<<endl;
for(i=1;i<=n;i++)
{
cin>>a[i];
}
}
void sort::process()
{
for(i=1;i<n;i++)
{
for(j=1;j<i;i++)
{
if(a[j]>a[j+1])
{
tmp=a[j];
a[j]=a[j+1];
a[j+1]=tmp;
}
}
}
}
void sort::display()
{
cout<<"Acending Order are:"<<endl;
for(i=1;i<=n;i++)
{
cout<<a[i]<<endl;
}
}
void main()
{
clrscr();
sort s;
[Link]();
[Link]();
[Link]();
getch();
}