C++ program to find sum of …

CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Kamlesh Kumari 6 years, 6 months ago
- 1 answers
Related Questions
Posted by Hanni Pham 1 year, 5 months ago
- 1 answers
Posted by Kandeepan Jothivel 1 year, 7 months ago
- 2 answers
Posted by Hanni Pham 1 year, 5 months ago
- 0 answers
Posted by Syedali Fathima 1 year, 6 months ago
- 1 answers
Posted by Prawar Narang 1 year, 7 months ago
- 1 answers
Posted by Priya Shukla 1 year, 6 months ago
- 1 answers

myCBSEguide
Trusted by 1 Crore+ Students

Test Generator
Create papers online. It's FREE.

CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
myCBSEguide
Sia ? 6 years, 6 months ago
#include<iostream>
using namespace std;
main()
{
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
cout << "Enter the number of rows and columns of matrix ";
cin >> m >> n;
cout << "Enter the elements of first matrix\n";
for ( c = 0 ; c < m ; c++ )
for ( d = 0 ; d < n ; d++ )
cin >> first[c][d];
cout << "Enter the elements of second matrix\n";
for ( c = 0 ; c < m ;c++ )
for ( d = 0 ; d < n ; d++ )
cin >> second[c][d];
for ( c = 0 ; c < m ; c++ )
for ( d = 0 ; d < n ; d++ )
sum[c][d] = first[c][d] + second[c][d];
cout << "Sum of entered matrices:-\n";
for ( c = 0 ; c < m ; c++ )
{
for ( d = 0 ; d < n ; d++ )
cout << sum[c][d] << "\t";
cout << endl;
}
return 0;
}
1Thank You