#include <iostream>
using namespace std;
int sort(int* arr, int size)
{
int temp;
for (int i = 0; i < size - 1; i++)
{
for(int j = 0; j < size - i - 1; j++)
{
if(arr[j] > arr[j+1])
{
temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}
int main()
{
int arr[10] = {6,8,25,9,65,3,57,12,4};
sort(arr, 10);
return 0;
}
}
Comments
Leave a comment