write a c++ program to sort an array using function template
//#include< conio.h >
#include< iostream >
using namespace std;
template< class bubble >
void bubblesort(bubble a[], int n)
{
int i, j;
for(i=0;i < n-1;i++)
{
for(j= i+1;j < n;j++)
{
if(a[i] > a[j])
{
bubble element;
element = a[i];
a[i] = a[j];
a[j] = element;
}
}
}
};
int main()
{
int a[10];
int size ;
cout << "ENTER SIZE :" << endl;
cin >> size;
cout << "\n ENTER ARRAY ELEMENYS: ";
for(int i=0;i < size;i++)
cin >> a[i] ;
//clrscr();
bubblesort(a,size);
cout<<"\nSorted Order Integers: ";
for(int i=0;i < size;i++)
cout << a[i] << "\n";
//getch();
}