20 lines
432 B
C
20 lines
432 B
C
#include "b.h"
|
|
#include <stdio.h>
|
|
|
|
int *arrSort(int arrInput[], int arrlen)
|
|
{
|
|
int i, j, temp;
|
|
for (i = 0; i < arrlen - 1; i++)
|
|
{
|
|
for (j = 0; j < arrlen - 1 - i; j++)
|
|
{
|
|
if (arrInput[j] > arrInput[j + 1])
|
|
{
|
|
temp = arrInput[j];
|
|
arrInput[j] = arrInput[j + 1];
|
|
arrInput[j + 1] = temp;
|
|
}
|
|
}
|
|
}
|
|
return arrInput;
|
|
} |