View Code of Problem 75

#include<stdio.h>
int main()
{int i,j,k=0,temp=0,a[10]={4,85,3,234,45,345,345,122,30,12};
for(i=0;i<10;i++){
 k=i;
 for(j=i+1;j<10;j++){
	 if(a[k]>a[j]){temp=a[k];
	              a[k]=a[j];
                  a[j]=temp;
	 }
 }
}
for(i=0;i<10;i++)printf("%d\n",a[i]);
return 0 ;
}

Double click to view unformatted code.


Back to problem 75