View Single Post
Super Moderator
x2495iiii's Avatar
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-18-2011, 07:35 PM

Your method will only sometimes work. In order to seal all the holes, you'd need to expand the if/else conditional to include all the numbers. If you expand the conditional to have the first sum compared to the other 7 sums (should be a total of 8 comparisons, 7 "and" joiners), it should catch all the un-magic squares. The list is just a neater way to do it, but it's not necessary.
Reply With Quote