We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I had to follow the tips people gave in the discussions about there only being 8 different 3x3 magic squares. For a start I did not even know the concept of a magic square and it took me a while to realize that the sums must equal 15. Anyhow, here is a solution in C, definitely not the most optimized but it's the best I could manage right now.
Forming a Magic Square
You are viewing a single comment's thread. Return to all comments →
I had to follow the tips people gave in the discussions about there only being 8 different 3x3 magic squares. For a start I did not even know the concept of a magic square and it took me a while to realize that the sums must equal 15. Anyhow, here is a solution in C, definitely not the most optimized but it's the best I could manage right now.