0

How to calculate number of tiles so we get 81 tiles on right and left diagonals in 2D matrix?

https://code.sololearn.com/cGgBkTnq935O/?ref=app

12th Jun 2021, 3:11 AM
TeaserCode
3 Answers
+ 2
The constants must be initialized and you cannot repeat 2 constants with the same name Error in: const int M; const int M; Try this: const int M=3; const int N=3;
12th Jun 2021, 3:54 AM
Cmurio
Cmurio - avatar
+ 1
Remember that a constant cannot change its value once started. Lo mejor seria que uses: int M=5 Sin la palabra const
12th Jun 2021, 5:45 AM
Cmurio
Cmurio - avatar
0
I try to solve it with trying and get correct result. I would like to know how to solve it with code.
12th Jun 2021, 5:04 AM
TeaserCode