#include<stdio.h>
#include<conio.h>
void main()
{
int a[20],i,j,temp,n;
printf("\n enter array size");
scanf("%d",&n);
printf("array elements are:\n",n);
for(i=0;i<n:i++)
printf("\n%d",a[i]);
for(i=0;i<=j;i++)
for(i=0;i<=j;i++)
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
printf("\n after sorting:\n");
for(i=0;i,n;i++)
printf("\n%d",&a[i]);
}
getch();
#include<conio.h>
void main()
{
int a[20],i,j,temp,n;
printf("\n enter array size");
scanf("%d",&n);
printf("array elements are:\n",n);
for(i=0;i<n:i++)
printf("\n%d",a[i]);
for(i=0;i<=j;i++)
for(i=0;i<=j;i++)
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
printf("\n after sorting:\n");
for(i=0;i,n;i++)
printf("\n%d",&a[i]);
}
getch();