Professional Documents
Culture Documents
Algorythm
Algorythm
Start
Step 1 : Declaration of Java Package (Import Java.util.*)
Step 2 : Declaration of Class (magic_square)
Step 3 : Declaration of main method
Step 4 : Initialization of variable (p, j, k, n, t)
Step 5 : Accepting the number of rows only of a magic square.
Step 6 : Declaration of array a [] [] int a [] [] = new int [n] [n]
Step 7 : Initialization of double dimensional array
Step 8 : Calculation required for magic square
Step 9 : Display the output magic square
Step 10 : End of the program
Start
Start