need an advice | SoloLearn: Learn to code for FREE!


need an advice

what is the best way to check the matrix, is it a "magic square"? A magic square is a square table filled with different numbers in such a way that the sum of the numbers in each row, each column and on both diagonals is the same 🌌 What is the best place to start? Check diagonals first? and then the lines? or how? And is it worth using boolean variables to solve this problem?

4/16/2020 8:00:13 PM


2 Answers

New Answer


Doesn't matter how you start. You need to check all rows, all columns and both diagonals. So start with anything. How do you plan to use boolean variables? I am curious.


I tried. But unsuccessfully...I will attach the code