#include <stdio.h>
void printArray(float *A, int n)
{
for (int i = 0; i < n; i++)
{
printf("%.1f ", A[i]);
}
printf("\n");
}
void selectionSort(float *A, int n)
{
int indexOfMin;
float temp;
for (int i = 0; i < n - 1; i++)
{
indexOfMin = i;
for (int j = i + 1; j < n; j++)
{
if (A[j] < A[indexOfMin])
{
indexOfMin = j;
}
}
temp = A[i];
A[i] = A[indexOfMin];
A[indexOfMin] = temp;
}
}
int main()
{
int n = 5;
float A[n];
for (int i = 0; i < n; i++)
{
scanf("%f", &A[i]);
}
printArray(A, n);
selectionSort(A, n);
printArray(A, n);
return 0;
}