Must be in C++
Answer
Here is code:
#include <iostream>
using namespace std;
void sort(int a[], int b[], int n)
{
int i, j, temp;
for (i = 0; i < n – 1; ++i)
{
for (j = (i + 1); j < n; ++j)
{
if (a[i] < a[j])
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
temp = b[i];
b[i] = b[j];
b[j] = temp;
}
}
}
}
int main()
{
int row = 8, col = 7;
int work[row][col] = {
{2, 4, 3, 4, 5, 8, 8},
{7, 3, 4, 3, 3, 4, 4},
{3, 3, 4, 3, 3, 2, 2},
{9, 3, 4, 7, 3, 4, 1},
{3, 5, 4, 3, 6, 3, 8},
{3, 4, 4,
OR
OR