Skip to content

heynikhil/Magic-Square-Javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Square nXn With JavaScript

Odd order Magic Square. Example: 3,5,7,… (2*n +1)

3X3 Example Magic Square

8 1 6
3 5 7
4 9 2
Doubly-even order Magic Square. Example : 4,8,12,16,.. (4*n)

4X4 Example Magic Square

16 2 3 12
5 11 10 8
9 7 6 12
4 14 15 1