Beta
Magic Squares
Description:
Magic squares are square arrangements of numbers such that they satisfy certain mathematical properties. An n by n magic square is a 2-dimensional array of numbers such that:
- The set of numbers in the magic square are n^2 consecutive numbers.
- Each row, column and diagonal of the magic square have the same sum of numbers in them.
Task:
Create a function magicSquare which takes in a number n and returns a n by n magic square.
Limits:
3<=n<=100
Puzzles
Similar Kata:
Stats:
Created | Feb 12, 2017 |
Published | Feb 12, 2017 |
Warriors Trained | 429 |
Total Skips | 190 |
Total Code Submissions | 130 |
Total Times Completed | 10 |
JavaScript Completions | 10 |
Total Stars | 3 |
% of votes with a positive feedback rating | 80% of 5 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 8 kyu |