array 3
#include<stdio.h>
int main()
{
int a[50],n,i,j,temp;
printf("please Enter number of elments you want in the array:");
scanf("%d",&n);
printf("please enter the Value of Elements:");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
for(j=0;j<n-i-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("Array after implementing bubble sort:");
for(i=0;i<n;i++)
{
printf("%d",a[i]);
}
}