Write a simple script using a loop to create a magic square
Write a simple script using a loop to create a magic square for Matlab.
Solution
for n=3:100
disp(magic(n))
end
-magic function is used to generate a magic square for order n by n matrix if present or possible.
In the above loop it displays all possible magic squares for orders between 3 and 100
