#include <iostream>
using namespace std;
int main()
{
int array2d[3][3]; // 2D array declared
int i, j; // variables for loop iteration
cout << "Enter the elements for 2D array:" << endl;
...
Gaining ratio needs to be calculated at the time of retirement or death of a partner for adjusting the retiring (or deceased) partner’s share of goodwill.