Question: C program Write a program that asks the user to enter the numbers from 1 to 16 (in any order) and then displays the number
C program
Write a program that asks the user to enter the numbers from 1 to 16 (in any order) and then displays the number in a 4 by 4 arrangement,followed by the sums of the rows, columns, and diagonals: Enter the numbers from 1 to 16 in any order: 16 3 2 13 5 10 11 8 9 6 7 12 4 15 14 1.
Row sums: 34 34 34 34 Column sums:34 34 34 34 Diagonal sums: 34 34
If the row,column, and diagonal sums are all the same as in the example,the numbers are said to form a Magic Square.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
