diff --git a/3.Selectionsort.c b/3.Selectionsort.c new file mode 100644 index 0000000..1532490 --- /dev/null +++ b/3.Selectionsort.c @@ -0,0 +1,29 @@ +#include +void main() +{ + int a[100],i,j,pos,n,swap; + printf("Enter the limit:"); + scanf("%d",&n); + for(i=0;ia[j]) + { + pos=j; + } + } + if(pos!=i) + { + swap=a[i]; + a[i]=a[pos]; + a[pos]=swap; + + } + } + for(i=0;i