This C++ program calculates the sum of all the rows and columns of a given Matrix. As you can see in the image below, the sum of the rows and columns are given on the Right side with green arrows and Bottom with red arrows respectively. See code below: