#include
#include
void main()
{
int a[10],n,i,j,temp;
clrscr();
printf("\nEnter the num of elements in the array:");
scanf("%d",&n);
printf("\nEnter the elements into the array");
flushall();
for(i=0;i
for(i=0;i
for(j=i+1;j
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
printf("the numbers after sorting are:");
for(i=0;i
getch();
}
No comments:
Post a Comment