COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
checkpoint6.3.cpp
Go to the documentation of this file.
1
#include <iostream>
2
using namespace
std;
3
4
int
main
(){
5
double
x[2][2][3] = { { {3, 4, 2}, {0, -3, 9} }, { {13, 4, 56}, {5, 9, 3}}};
6
int
max_value, min_value = x[0][0][0];
7
for
(
int
i = 0; i < 2; i++){
8
for
(
int
j = 0; j < 2; j++){
9
for
(
int
k = 0; k < 3; k++){
10
if
(x[i][j][k] > max_value){
11
max_value = x[i][j][k];
12
}
13
if
(x[i][j][k] < min_value){
14
min_value = x[i][j][k];
15
}
16
}
17
}
18
}
19
cout << max_value <<
" "
<< min_value << endl;
20
}
main
int main()
Definition
checkpoint6.3.cpp:4
Module6
checkpoint6.3.cpp
Generated on Sun Sep 29 2024 16:39:53 for COMP2113 by
1.12.0