Question: Want to build the c++ sort function without using library . So I build the code but error code appeared. Can you fix this? The

Want to build the c++ sort function without using library. So I build the code but error code appeared. Can you fix this? The code is shown below

#include

using namespace std;

// build sort function

void fc_sort(int Li[], int size){

for (int i=0; i

for (int j=i+1; j

if ( Li[i] > Li[j]){

Li[i] = Li[j];

}

}

}

for (int i=0; i

cout << Li[i] << " ";

}

}

int main(){

int LL[] = {3,4,5,1,2};

fc_sort(LL, 5);

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!