Write your question here.
Hi there, pls comment my mistakes
#include<iostream>
using namespace std;
int sortingfunc(int arr[], int size)
{
int temp;
for (int i = 0; i < size; 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;
return 0;
}
}
}
int main()
{
int arr[] = { 8,9,7,5,9,10,11,12,15,14 };
sortingfunc(arr, 10);
for (int i = 0; i < 10; i++)
{
cout << arr[i] << endl;
}
}