include iostream using namespace std int main double array 10 array2 m

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
using namespace std;
int main() {
double array[10], array2[4][4], max, max2;
cout << "input array[10]" << endl;
for(auto &element: array) {
std::cin >> element;
}
cout << "input array[4][4]" << endl;
for(auto &elements: array2){
for(auto &element: elements){
cin >> element;
}
}
for(auto &element: array) {
if(abs(element) > max) max = abs(element);
}
for(auto &elements: array2){
for(auto &element: elements){
if(abs(element) > max2) max2 = abs(element);
}
}
cout << "biggest value in array[10] => " << max << endl << "biggest value in array[4][4] => " << max2 << std::endl;
return 0;
}