#include <stdio.h>
#include <stdlib.h>
void swap (int a, int b){
int temp;
temp = a;
a = b;
b = temp;
}
void Selection_Sort (int A[], int size){
int i,j;
for ( i = 0; i < size; i++){
for ( j = i+1; j < size; j++){
if (A[i] > A[j]){
swap(A[j],A[i]);
}
}
}
}
int main()
{
int n,i;
int A[100];
printf("Enter the number of elements to be sorted: ");
scanf("%d",&n);
for(i=0;i<n;++i)
{
printf("%d. Enter element: ",i+1);
scanf("%d",&A[i]);
}
Selection_Sort(A, n);
for(i=0;i<n;++i)
{
printf("%d ",A[i]);
}
}