Code for ascending order(using bubble sort)
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5o7S_W-X8mwCDMFJihhvjq2xbON1YOkF2up67qX17xf0dAA6_xVPdoiI2iV9I3kYiaXhAlZpYwCcfEk4_5ubUJY0mbnJMO8vYw0eUjr-QepJaRzzkuj65SbVQ17xorKZuBsB62yb9Kq0/s320/2017-07-13+%25284%2529.png)
Code for ascending order(using bubble sort) #include<stdio.h> #include<conio.h> void main() { int i,a[10],j=i+1,c; printf("Enter 5 elements"); for(i=0;i<5;i++) { scanf("%d",&a[i]); } printf("Ascending order="); for(i=0;i<5;i++) { for(j=i;j<5;j++) { if(a[i]>a[j]) { c=a[i]; a[i]=a[j]; a[j]=c; } } printf("%d",a[i]); } getch(); } ...