Write a program in c plus plus to read a 3x3 matrix and find the smallest number in that matrix?

#include<iostream>

#include<array>

#include<limits>

#include<random>

using namespace std;

const size_t max_row = 3;

const size_t max_col = 3;

using array3x3 = std::array<std::array<int, max_col>, max_row>;

int get_min (const array3x3& arr)

{

int min = INT_MAX;

for (size_t row=0; row!=max_row; ++row)

for (size_t col=0; col!=max_col; ++col)

if (arr[row][col] < min)

min = arr[row][col];

return min;

}

int get_max (const array3x3& arr)

{

int max = INT_MIN;

for (size_t row=0; row!=max_row; ++row)

for (size_t col=0; col!=max_col; ++col)

if (max < arr[row][col])

max = arr[row][col];

return max;

}

int main()

{

std::default_random_engine generator;

std::uniform_int_distribution<int> distribution (-10, 10);

cout << "Array\n" << endl;

array3x3 arr;

for (size_t row=0; row!=max_row; ++row)

{

for (size_t col=0; col!=max_col; ++col)

{

arr[row][col] = distribution (generator);

cout << arr[row][col] << '\t';

}

cout << endl;

}

cout << endl;

cout << "Minimum = " << get_min (arr) << endl;

cout << "Maximum = " << get_max (arr) << endl;

}