#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
void kedou(int arr[], int len)
{
for (int i = 0; i < len - 1; i++)
{
for (int j = 0; j < len - 1 - i; j++)
{
if (*(arr + j)>*(arr + j + 1)){
int temp = *(arr + j);
*(arr + j) = *(arr + j + 1);
*(arr + j + 1) = temp;
}
}
}
for ( int k = 0; k < len; k++)
{
printf("%d\n", arr[k]);
}
}
int main(void)
{
int arr[] = { 1, 3, 4, 5, 6, 7, 8, 9, 2, 10 };
int len = sizeof(arr) / sizeof(int);
kedou(arr, len);
system("pause");
return 0;
}