ShriRam Changed status to publish July 15, 2022
#include<stdio.h>
#include<conio.h>
void main()
{
int a[100],t,i,j,n;
printf("\n Please Enter the Size of an Array : ");
scanf("%d", &n);
printf("\nPlease Enter the Array Elements : \n");
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])
{
t=a[j];
a[j]=a[j+1];
a[j+1]=t;
}
printf("Sorted values are : \n");
for(i=0;i<n;i++)
printf("\n%d:=",a[i]);
getch();
}
ShriRam Changed status to publish July 15, 2022