#include <iostream>
using namespace std;
int main()
{
int n, m;
int **arr;
int min;
cout << "Enter dimension of array (n/m)" << endl;
cin >> n >> m;
arr = new int *[n];
for (int i = 0; i < n; i++) {
arr[i] = new int[m];
}
for (int j = 0; j < m; j++) {
cout << "arr[" << i << "][" << j << "] = ";
cin >> arr[i][j];
cout << "Your array:" << endl;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
cout << arr[i][j] << " ";
cout << endl;
cout << "Min is: ";
min = arr[0][0];
if (min > arr[i][j]) {
min = arr[i][j];
cout << min << endl;
return 0;
#include <iostream>
using namespace std;
int main()
{
int n, m;
int **arr;
int min;
cout << "Enter dimension of array (n/m)" << endl;
cin >> n >> m;
arr = new int *[n];
for (int i = 0; i < n; i++) {
arr[i] = new int[m];
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cout << "arr[" << i << "][" << j << "] = ";
cin >> arr[i][j];
}
}
cout << "Your array:" << endl;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cout << arr[i][j] << " ";
}
cout << endl;
}
cout << "Min is: ";
min = arr[0][0];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (min > arr[i][j]) {
min = arr[i][j];
}
}
}
cout << min << endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n, m;
int **arr;
int min;
cout << "Enter dimension of array (n/m)" << endl;
cin >> n >> m;
arr = new int *[n];
for (int i = 0; i < n; i++) {
arr[i] = new int[m];
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cout << "arr[" << i << "][" << j << "] = ";
cin >> arr[i][j];
}
}
cout << "Your array:" << endl;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cout << arr[i][j] << " ";
}
cout << endl;
}
cout << "Min is: ";
min = arr[0][0];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (min > arr[i][j]) {
min = arr[i][j];
}
}
}
cout << min << endl;
return 0;
}