+ 6

Magic Square

Can we make a 3x3 square in which total of 3 No's in all directions is equal ? in C+ + or C# ?

9th Apr 2017, 2:47 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar
4 odpowiedzi
+ 8
Check this code (https://code.sololearn.com/cKviIY8JwD5Z/?ref=app). Give 3 as input and it generates a 3x3 magic square. You can give any odd number as input.
9th Apr 2017, 2:52 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 4
Great This works with 7x7 grid Wow Thank you dear.
23rd Aug 2017, 2:21 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar
+ 3
Wow. Thx Krishna.
9th Apr 2017, 2:57 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar
+ 1
Yes Mr Krishna but it doesn't work for a 2x2 grid.
20th Nov 2017, 7:30 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar