#include <iostream.h>
#include <conio.h>
void main()
{
clrscr(); int h,m,n;
int a[6]={50,40,45,90,35,70};
for(int k=0;k<=4;k++){
cout<<"Phase No. "<<k+1<<"Starts from here : ";
for(int j=0;j<=4;j++)
{
for(int p=j;p<=j;p++)
{ h=a[j];n=a[j+1];
if(a[j]>a[j+1])
{ a[j+1]=h;
a[j]=n;}}
for(int i=0;i<=5;i++)
cout<<a[i];
cout<<endl;
} }
getch();
}This code will Bubble sort the given array .. This is the easiest code for bubble sort.