0

how to find max or min number in two dimensional array ?.

.

5th Jul 2020, 5:49 AM
Saber Ahmadzai
Saber Ahmadzai - avatar
5 Answers
+ 4
store the fisrt number in a variable ,then Loop through the array comparing that stored value with each value of array ,to find maximum see if the stored value is less than rest of the values in array if yes exchange them ,for minimum check if stored value is greater than rest of values in array,if yes exchange
5th Jul 2020, 7:15 AM
Abhay
Abhay - avatar
+ 4
If you know basics of cpp,it isn't difficult ,you should show your attempt first ,so we can help you further
5th Jul 2020, 7:19 AM
Abhay
Abhay - avatar
0
Can show me in coding please? Abhay
5th Jul 2020, 7:18 AM
Saber Ahmadzai
Saber Ahmadzai - avatar
0
Thanks bro Vadi velan
5th Jul 2020, 9:59 AM
Saber Ahmadzai
Saber Ahmadzai - avatar
0
Use swapping to get max or min simply after moving through array.
6th Jul 2020, 4:54 PM
shubham kumar
shubham kumar - avatar