Below is the question: This is in c++, My solution give was wrong,…

Question Answered step-by-step Below is the question: This is in c++, My solution give was wrong,… Below is the question: Image transcription text5. Write a function that reorders thevalues in three integer variables suchthat the values are in asce… Show more… Show more This is in c++, My solution give was wrong, and give me the feedback for my code. And help me to fix the code. ThanksImage transcription text5: the solution is correct. The algorithmis not the most efficient. Imaginereordering 10 numbers us… Show more… Show more#include using namespace std;void reorder(int* a, int* b, int* c);void replace(int* x, int* y);int main(void){   int a = 2, b = 3, c = 1;   cout << "Before reordering: " << endl;   cout << " a = " << a << endl;   cout << " b = " << b << endl;   cout << " c = " << c << endl;   reorder(&a, &b, &c);   cout << "nAfter reordering: " << endl;   cout << " a = " << a << endl;   cout << " b = " << b << endl;   cout << " c = " << c << endl;   return 0;}void reorder(int* a, int* b, int* c){   if (*a > *b)       replace(a, b);   if (*b > *c)       replace(b, c);   if (*a > *b)       replace(a, b);}void replace(int* x, int* y){   int temp;   if (*x > *y)   {       temp = *x;       *x = *y;       *y = temp;   }} Computer Science Engineering & Technology C++ Programming ENGINEERIN SWE20004 Share QuestionEmailCopy link Comments (0)