My issue
the code is showing correct output on other compilers but not on this one .Don’t know why
My code
#include <bits/stdc++.h>
using namespace std;
int main()
{
// your code goes here
int n , m;
cin>>n>>m;
int a[n][m];
int b[n][m];
for(int i = 0;i<n;i++)
{
for(int j = 0;j<m;j++)
{
cin>>a[i][j];
}
}
for(int i = 0;i<n;i++)
{
for( int j = 0;j<m;j++)
{
cin>>b[i][j];
}
}
int x[n][m];
for(int i =0;i<n;i++)
{
for(int j = 0;j<n;j++)
{
x[i][j] = a[i][j]+b[i][j];
}
}
for(int i = 0;i<n;i++)
{
for(int j = 0;j<m;j++)
{
cout<<x[i][j]<<" ";
}
}
return 0 ;
}
Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-dsa-c/MUJDSAC09/problems/MATADD