Addition of two matrix in C++

How It Works:

    • For 2D array size there must be constant value in square brackets likeĀ 

  • Two const variables row and col are used to define size.
  • if we do not make both const then error found because without const reserve word they are behaving as variable.
  • Before placing both variable in square brackets they must initialized else error will be found.
  • 3 nested for loops are used two for taking input in matrix 2D arrays and one for resultant matrix.

Here is the program for addition of two matrix in C++


Be the first to comment

Leave a Reply