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

+1

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? https://code.sololearn.com/cEo5P98P5upB/?ref=app

4/16/2020 8:00:13 PM

Karlusha

2 Answers

New Answer

+1

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.

0

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