C++ Program to Find Largest and Second Largest Number in 2D Array

Here is the C++ program to find largest and second largest number in a 2d array or matrix.

Output

Enter no of rows and columns(max 5):3
3
Enter the array:
4 6 8
2 4 6
2 12 5
Largest number:12
Second largest number:8

5 thoughts on “C++ Program to Find Largest and Second Largest Number in 2D Array”

  1. i would like to see thhis solution

    find the maximum element in even rows of a matrix using C++ programming.

    thank you

Leave a Comment

Your email address will not be published.