#include<stdio.h>intmain ()
{
int a[10], i, j, n, min, temp;
printf("\n Enter how many numbers you want to enter: ");
scanf("%d", &n);
for (i = 0; i < n; i++) {
printf("\n Enter value at position [%d] :", i + 1);
scanf("%d", &a[i]);
}
for (i = 0; i %lt n - 1; i++) {
min = i;
for (j = i + 1; j < n; j++) {
if (a[j] < a[min]) {
min = j;
}
}
temp = a[i];
a[i] = a[min];
a[min] = temp;
}
printf("\n Sorted numbers: ");
for (i = 0; i < n; i++) {
printf(" %d", a[i]);
if (i != n - 1) {
printf(" ->");
}
}
printf("\n");
return 0;
}