• 0

C Help Magic Square


Question

3 answers to this question

Recommended Posts

  • 0

well no it works on the concept that a magic sqaure is an N by N grid of sqaures such that each square contains a distinct integer and the sum of integeers in every row, column and main diagnal is the same.

It's an algorithm for producting one that works. Fill in bottow ro middle column. Then move two up and one right. If empty, fill. If not empty, move down one and one left. (looping to the opposite side of the grid when necessary)

Link to comment
Share on other sites

  • 0

N by N grid, each square contains numbers from this range: [1,N]. Like WiNnErPL said, the sum of the two main diagonals and each rows and columns must be the same.

There are number of way of doing this. Search on www.google.com Learn for yourself.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.