C++#include <iostream>#include <math.h>using namespace std;int main(){int nmax = 10;int n,i,j,imax,jmax;int M[n][2];int x,y;int mx;cout << \"Vvedite kolichestvo tochek ot 2 do \" << nmax <<\": \";cin >> n;for (i = 1; i < n; i++)for (j = 1; j < n; j++){cin << M[i][j];}cout << \"Koordinaty: \";for (i = 1; i < n; i++){cout << \"Vvedite x: \";cin >> x;}for (i = 1; i < n; i++){cout << \"Vvedite y: \";cin >> y;}mx = sqrt(((M[i][j] - M[i+1][j])*(M[i][j] - M[i+1][j])) + ((M[i][j]-M[i][j+1])*(M[i][j]-M[i][j+1])));imax = 1;imax = 2;for (i =1; i < n-1; i++)if (sqrt(((M[i][j] - M[i+1][j])*(M[i][j] - M[i+1][j])) + ((M[i][j]-M[i][j+1])*(M[i][j]-M[i][j+1]))) > mx)mx = sqrt(((M[i][j] - M[i+1][j])*(M[i][j] - M[i+1][j])) + ((M[i][j]-M[i][j+1])*(M[i][j]-M[i][j+1])));imax = i;imax = j;cout << \"Maksimalnoe rasstoyanie mezhdu tochkami\" << imax << \" - \" << jmax << \" = \" << mx << endl;return 0;}